about summary refs log tree commit diff
path: root/compiler/rustc_driver/src/lib.rs
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2022-12-31 01:56:59 +0000
committerMichael Goulet <michael@errs.io>2023-01-09 22:04:00 +0000
commit05c1ac0215ef282c9ed6df6a5f758d824ee1ace9 (patch)
tree8834e599e3c5233a6627a1233cfd2852a6ca6c7d /compiler/rustc_driver/src/lib.rs
parent3020239de947ec52677e9b4e853a6a9fc073d1f9 (diff)
downloadrust-05c1ac0215ef282c9ed6df6a5f758d824ee1ace9.tar.gz
rust-05c1ac0215ef282c9ed6df6a5f758d824ee1ace9.zip
Collect backtraces for delayed span-bugs too
Diffstat (limited to 'compiler/rustc_driver/src/lib.rs')
-rw-r--r--compiler/rustc_driver/src/lib.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_driver/src/lib.rs b/compiler/rustc_driver/src/lib.rs
index 3cbe0052359..fcb73c64356 100644
--- a/compiler/rustc_driver/src/lib.rs
+++ b/compiler/rustc_driver/src/lib.rs
@@ -1196,8 +1196,8 @@ 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
-            // Don't do this for `GoodPathBug`, which already emits its own more useful backtrace.
-            if !info.payload().is::<rustc_errors::GoodPathBug>() {
+            // Don't do this for delayed bugs, which already emit their own more useful backtrace.
+            if !info.payload().is::<rustc_errors::DelayedBugPanic>() {
                 (*DEFAULT_HOOK)(info);
 
                 // Separate the output with an empty line
@@ -1235,7 +1235,7 @@ pub fn report_ice(info: &panic::PanicInfo<'_>, bug_report_url: &str) {
     // a .span_bug or .bug call has already printed what
     // it wants to print.
     if !info.payload().is::<rustc_errors::ExplicitBug>()
-        && !info.payload().is::<rustc_errors::GoodPathBug>()
+        && !info.payload().is::<rustc_errors::DelayedBugPanic>()
     {
         let mut d = rustc_errors::Diagnostic::new(rustc_errors::Level::Bug, "unexpected panic");
         handler.emit_diagnostic(&mut d);