compiler: Treat ForceWarning as a Warning for diagnostic level

This silences an ICE.
This commit is contained in:
Jubilee Young
2025-06-07 00:44:08 -07:00
parent f315e61458
commit 5bab0d2e66
3 changed files with 42 additions and 1 deletions

View File

@@ -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());
}