about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorhosseind75 <dindar95@bk.ru>2020-09-29 18:14:07 +0330
committerhosseind88 <hosseind88@mail.ru>2020-10-09 20:57:45 +0330
commit3c94914f0c87ba00987e515063dcc9e079a8918d (patch)
tree28ec652151919a89e3b5e58d12f021093aa090e0 /src
parent7f07577e6f873f4a1b3428d29bf520189f4ef79e (diff)
downloadrust-3c94914f0c87ba00987e515063dcc9e079a8918d.tar.gz
rust-3c94914f0c87ba00987e515063dcc9e079a8918d.zip
rebase with master
Diffstat (limited to 'src')
-rw-r--r--src/driver.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/driver.rs b/src/driver.rs
index 0b324775b0d..bf9110b4349 100644
--- a/src/driver.rs
+++ b/src/driver.rs
@@ -277,7 +277,9 @@ fn report_clippy_ice(info: &panic::PanicInfo<'_>, bug_report_url: &str) {
     // If backtraces are enabled, also print the query stack
     let backtrace = env::var_os("RUST_BACKTRACE").map_or(false, |x| &x != "0");
 
-    TyCtxt::try_print_query_stack(&handler, Some(2), Some(backtrace));
+    let num_frames = if backtrace { None } else { Some(2) };
+
+    TyCtxt::try_print_query_stack(&handler, num_frames);
 }
 
 fn toolchain_path(home: Option<String>, toolchain: Option<String>) -> Option<PathBuf> {