about summary refs log tree commit diff
path: root/compiler/rustc_errors
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2025-06-07 22:22:59 +0200
committerGitHub <noreply@github.com>2025-06-07 22:22:59 +0200
commit3c860e37646af30eb331493e3e4c612260d6abc8 (patch)
tree17c487261f8edb56853d1a8cffd0b01c5934463e /compiler/rustc_errors
parent5f6d9829cdf1bacd97d757f8aa5357718586a05e (diff)
parent5bab0d2e66f77e34865026856dcd5ae21f0b2d2f (diff)
Rollup merge of #142148 - workingjubilee:dont-ice-on-force-warn, r=Urgau
compiler: Treat ForceWarning as a Warning for diagnostic level

This silences an ICE.

No idea if this is the correct solution though tbh.

Fixes rust-lang/rust#142144
Diffstat (limited to 'compiler/rustc_errors')
-rw-r--r--compiler/rustc_errors/src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs
index bd421a441f9..6f0090a0bd6 100644
--- a/compiler/rustc_errors/src/lib.rs
+++ b/compiler/rustc_errors/src/lib.rs
@@ -1529,7 +1529,7 @@ impl DiagCtxtInner {
             // Future breakages aren't emitted if they're `Level::Allow` or
             // `Level::Expect`, but they still need to be constructed and
             // stashed below, so they'll trigger the must_produce_diag check.
-            assert_matches!(diagnostic.level, Error | Warning | Allow | Expect);
+            assert_matches!(diagnostic.level, Error | ForceWarning | Warning | Allow | Expect);
             self.future_breakage_diagnostics.push(diagnostic.clone());
         }