about summary refs log tree commit diff
path: root/compiler/rustc_interface/src
diff options
context:
space:
mode:
authorOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2023-06-27 09:07:14 +0000
committerPhilipp Krones <hello@philkrones.com>2023-06-27 16:12:07 +0200
commitb0142f603dd171dccf822a868284c93b8f6f6f91 (patch)
treecaee3821eb7094fe1855b0d360b1c8788ce1c13f /compiler/rustc_interface/src
parent5d3377dd6782b7f609902189eaac0cb31829c4b0 (diff)
downloadrust-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.rs7
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
         }