diff options
Diffstat (limited to 'compiler/rustc_errors/src/lib.rs')
| -rw-r--r-- | compiler/rustc_errors/src/lib.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs index a8fd1a17a51..170d4341ae7 100644 --- a/compiler/rustc_errors/src/lib.rs +++ b/compiler/rustc_errors/src/lib.rs @@ -1254,6 +1254,10 @@ impl HandlerInner { } if diagnostic.has_future_breakage() { + // Future breakages aren't emitted if they're Level::Allowed, + // but they still need to be constructed and stashed below, + // so they'll trigger the good-path bug check. + self.suppressed_expected_diag = true; self.future_breakage_diagnostics.push(diagnostic.clone()); } |
