about summary refs log tree commit diff
path: root/compiler/rustc_driver/src
diff options
context:
space:
mode:
authorhosseind75 <dindar95@bk.ru>2020-09-19 17:51:24 +0430
committerhosseind88 <hosseind88@mail.ru>2020-10-09 20:57:44 +0330
commit17eb8d8b34a733640a0565e5ae589711f28c6e7a (patch)
tree7baf1f45b65befa38038eeec9a01d616360901ce /compiler/rustc_driver/src
parentbe719d11e56817753d4196291bc427c2704dab3d (diff)
downloadrust-17eb8d8b34a733640a0565e5ae589711f28c6e7a.tar.gz
rust-17eb8d8b34a733640a0565e5ae589711f28c6e7a.zip
ICEs should print the top of the query stack
Diffstat (limited to 'compiler/rustc_driver/src')
-rw-r--r--compiler/rustc_driver/src/lib.rs7
1 files changed, 1 insertions, 6 deletions
diff --git a/compiler/rustc_driver/src/lib.rs b/compiler/rustc_driver/src/lib.rs
index 066a61a7a7b..a6648639509 100644
--- a/compiler/rustc_driver/src/lib.rs
+++ b/compiler/rustc_driver/src/lib.rs
@@ -1211,12 +1211,7 @@ pub fn report_ice(info: &panic::PanicInfo<'_>, bug_report_url: &str) {
         handler.note_without_error(&note);
     }
 
-    // If backtraces are enabled, also print the query stack
-    let backtrace = env::var_os("RUST_BACKTRACE").map(|x| &x != "0").unwrap_or(false);
-
-    if backtrace {
-        TyCtxt::try_print_query_stack(&handler);
-    }
+    TyCtxt::try_print_query_stack(&handler, Some(2));
 
     #[cfg(windows)]
     unsafe {