Skip to content

Commit d65fffc

Browse files
authored
Rollup merge of rust-lang#117397 - compiler-errors:dont-emit-good-path-on-panic, r=TaKO8Ki
Don't emit delayed good-path bugs on panic This should fix rust-lang#117381, cc `@RalfJung` As opposed to delayed bugs, delayed *good path* bugs really don't make sense to show on panics.
2 parents 765ac22 + 8076414 commit d65fffc

File tree

1 file changed

+1
-1
lines changed
  • compiler/rustc_errors/src

1 file changed

+1
-1
lines changed

compiler/rustc_errors/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ impl Drop for HandlerInner {
556556
// instead of "require some error happened". Sadly that isn't ideal, as
557557
// lints can be `#[allow]`'d, potentially leading to this triggering.
558558
// Also, "good path" should be replaced with a better naming.
559-
if !self.has_any_message() && !self.suppressed_expected_diag {
559+
if !self.has_any_message() && !self.suppressed_expected_diag && !std::thread::panicking() {
560560
let bugs = std::mem::replace(&mut self.delayed_good_path_bugs, Vec::new());
561561
self.flush_delayed(
562562
bugs,

0 commit comments

Comments
 (0)