diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-11-01 11:29:41 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-01 11:29:41 +0100 |
| commit | 6bbe22c9668fe5c500338f070c39d2918772eaaf (patch) | |
| tree | ecd71e1ef816c77964e93bd320f8e6893153d8a6 /compiler/rustc_errors | |
| parent | 260e07b0cb7da961d25395e529b1d11d45a7101e (diff) | |
| parent | 8076414f89275786ae04035151d54bb5b47bde9f (diff) | |
| download | rust-6bbe22c9668fe5c500338f070c39d2918772eaaf.tar.gz rust-6bbe22c9668fe5c500338f070c39d2918772eaaf.zip | |
Rollup merge of #117397 - compiler-errors:dont-emit-good-path-on-panic, r=TaKO8Ki
Don't emit delayed good-path bugs on panic This should fix #117381, cc ``@RalfJung`` As opposed to delayed bugs, delayed *good path* bugs really don't make sense to show on panics.
Diffstat (limited to 'compiler/rustc_errors')
| -rw-r--r-- | compiler/rustc_errors/src/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs index 5e3fdf170bc..dd462cc6486 100644 --- a/compiler/rustc_errors/src/lib.rs +++ b/compiler/rustc_errors/src/lib.rs @@ -556,7 +556,7 @@ impl Drop for HandlerInner { // instead of "require some error happened". Sadly that isn't ideal, as // lints can be `#[allow]`'d, potentially leading to this triggering. // Also, "good path" should be replaced with a better naming. - if !self.has_any_message() && !self.suppressed_expected_diag { + if !self.has_any_message() && !self.suppressed_expected_diag && !std::thread::panicking() { let bugs = std::mem::replace(&mut self.delayed_good_path_bugs, Vec::new()); self.flush_delayed( bugs, |
