diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2023-06-27 09:07:14 +0000 |
|---|---|---|
| committer | Philipp Krones <hello@philkrones.com> | 2023-06-27 16:12:07 +0200 |
| commit | b0142f603dd171dccf822a868284c93b8f6f6f91 (patch) | |
| tree | caee3821eb7094fe1855b0d360b1c8788ce1c13f /compiler/rustc_interface/src | |
| parent | 5d3377dd6782b7f609902189eaac0cb31829c4b0 (diff) | |
| download | rust-b0142f603dd171dccf822a868284c93b8f6f6f91.tar.gz rust-b0142f603dd171dccf822a868284c93b8f6f6f91.zip | |
Avoid calling queries during query stack printing
Diffstat (limited to 'compiler/rustc_interface/src')
| -rw-r--r-- | compiler/rustc_interface/src/interface.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/rustc_interface/src/interface.rs b/compiler/rustc_interface/src/interface.rs index 54dabb75764..361ddc25dfd 100644 --- a/compiler/rustc_interface/src/interface.rs +++ b/compiler/rustc_interface/src/interface.rs @@ -349,7 +349,12 @@ pub fn try_print_query_stack(handler: &Handler, num_frames: Option<usize>) { // state if it was responsible for triggering the panic. let i = ty::tls::with_context_opt(|icx| { if let Some(icx) = icx { - print_query_stack(QueryCtxt::new(icx.tcx), icx.query, handler, num_frames) + ty::print::with_no_queries!(print_query_stack( + QueryCtxt::new(icx.tcx), + icx.query, + handler, + num_frames + )) } else { 0 } |
