diff options
Diffstat (limited to 'compiler/rustc_driver/src')
| -rw-r--r-- | compiler/rustc_driver/src/lib.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/compiler/rustc_driver/src/lib.rs b/compiler/rustc_driver/src/lib.rs index 711eed2b272..236f66eae72 100644 --- a/compiler/rustc_driver/src/lib.rs +++ b/compiler/rustc_driver/src/lib.rs @@ -1199,10 +1199,13 @@ static DEFAULT_HOOK: LazyLock<Box<dyn Fn(&panic::PanicInfo<'_>) + Sync + Send + }; // Invoke the default handler, which prints the actual panic message and optionally a backtrace - (*DEFAULT_HOOK)(info); + // Don't do this for `ExplicitBug`, which has an unhelpful message and backtrace. + if !info.payload().is::<rustc_errors::ExplicitBug>() { + (*DEFAULT_HOOK)(info); - // Separate the output with an empty line - eprintln!(); + // Separate the output with an empty line + eprintln!(); + } // Print the ICE message report_ice(info, BUG_REPORT_URL); |
