diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2020-10-16 02:10:09 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-16 02:10:09 +0200 |
| commit | 0e4d19603bcea4e5cc54fee460c0582f9b31cb3f (patch) | |
| tree | 48d347c6c75af4a9961c3f449d23c733bad10bbc /compiler/rustc_driver/src/lib.rs | |
| parent | 85dbb034909793f7f6387a668ce1c5da8bae6432 (diff) | |
| parent | 46cc889abf6564408ffa1d9e896a3fc22a859d10 (diff) | |
| download | rust-0e4d19603bcea4e5cc54fee460c0582f9b31cb3f.tar.gz rust-0e4d19603bcea4e5cc54fee460c0582f9b31cb3f.zip | |
Rollup merge of #77493 - hosseind88:ICEs_should_always_print_the_top_of_the_query_stack, r=oli-obk
ICEs should always print the top of the query stack see #76920
Diffstat (limited to 'compiler/rustc_driver/src/lib.rs')
| -rw-r--r-- | compiler/rustc_driver/src/lib.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_driver/src/lib.rs b/compiler/rustc_driver/src/lib.rs index 136c9f6ec7d..d99e335a77a 100644 --- a/compiler/rustc_driver/src/lib.rs +++ b/compiler/rustc_driver/src/lib.rs @@ -1258,9 +1258,9 @@ pub fn report_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(|x| &x != "0").unwrap_or(false); - if backtrace { - TyCtxt::try_print_query_stack(&handler); - } + let num_frames = if backtrace { None } else { Some(2) }; + + TyCtxt::try_print_query_stack(&handler, num_frames); #[cfg(windows)] unsafe { |
