about summary refs log tree commit diff
path: root/compiler/rustc_errors/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-06-21 09:22:09 +0000
committerbors <bors@rust-lang.org>2024-06-21 09:22:09 +0000
commitd40f30e1df337215f014f6a62053cc315dd26b6b (patch)
treee69aeabff38b4da549fae4d4311f749ae59ee038 /compiler/rustc_errors/src
parente32ea4822ba3f7c9054a7fb5345232388cc50c4b (diff)
parentd86736c9be8c06988470dc90d086d12d9cbcd1bb (diff)
downloadrust-d40f30e1df337215f014f6a62053cc315dd26b6b.tar.gz
rust-d40f30e1df337215f014f6a62053cc315dd26b6b.zip
Auto merge of #126781 - matthiaskrgr:rollup-5u4pens, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #126125 (Improve conflict marker recovery)
 - #126481 (Add `powerpc-unknown-openbsd` maintenance status)
 - #126613 (Print the tested value in int_log tests)
 - #126617 (Expand `avx512_target_feature` to include VEX variants)
 - #126700 (Make edition dependent `:expr` macro fragment act like the edition-dependent `:pat` fragment does)
 - #126707 (Pass target to inaccessible-temp-dir rmake test)
 - #126767 (`StaticForeignItem` and `StaticItem` are the same)
 - #126774 (Fix another assertion failure for some Expect diagnostics.)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_errors/src')
-rw-r--r--compiler/rustc_errors/src/lib.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs
index 620f56c01e8..91112a57277 100644
--- a/compiler/rustc_errors/src/lib.rs
+++ b/compiler/rustc_errors/src/lib.rs
@@ -1456,10 +1456,10 @@ impl DiagCtxtInner {
         }
 
         if diagnostic.has_future_breakage() {
-            // Future breakages aren't emitted if they're `Level::Allow`,
-            // 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));
+            // 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(_)));
             self.future_breakage_diagnostics.push(diagnostic.clone());
         }