about summary refs log tree commit diff
path: root/compiler/rustc_errors/src
diff options
context:
space:
mode:
authorJubilee Young <workingjubilee@gmail.com>2025-06-07 00:44:08 -0700
committerJubilee Young <workingjubilee@gmail.com>2025-06-07 00:49:29 -0700
commit5bab0d2e66f77e34865026856dcd5ae21f0b2d2f (patch)
tree06e71ea7797ae63d4be40f7b5969320561928da5 /compiler/rustc_errors/src
parentf315e6145802e091ff9fceab6db627a4b4ec2b86 (diff)
downloadrust-5bab0d2e66f77e34865026856dcd5ae21f0b2d2f.tar.gz
rust-5bab0d2e66f77e34865026856dcd5ae21f0b2d2f.zip
compiler: Treat ForceWarning as a Warning for diagnostic level
This silences an ICE.
Diffstat (limited to 'compiler/rustc_errors/src')
-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());
         }