From 5bab0d2e66f77e34865026856dcd5ae21f0b2d2f Mon Sep 17 00:00:00 2001 From: Jubilee Young Date: Sat, 7 Jun 2025 00:44:08 -0700 Subject: compiler: Treat ForceWarning as a Warning for diagnostic level This silences an ICE. --- compiler/rustc_errors/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/rustc_errors') 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()); } -- cgit 1.4.1-3-g733a5