mirror of
https://github.com/rust-lang/rust
synced 2024-10-14 12:33:57 +00:00
Tighten the assertion in downgrade_to_delayed_bug
.
I.e. `Bug` and `Fatal` level diagnostics are never downgraded.
This commit is contained in:
parent
e8c3cbf44b
commit
5dd0431386
|
@ -306,7 +306,7 @@ pub(crate) fn is_force_warn(&self) -> bool {
|
|||
#[track_caller]
|
||||
pub fn downgrade_to_delayed_bug(&mut self) {
|
||||
assert!(
|
||||
self.is_error(),
|
||||
matches!(self.level, Level::Error | Level::DelayedBug(_)),
|
||||
"downgrade_to_delayed_bug: cannot downgrade {:?} to DelayedBug: not an error",
|
||||
self.level
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue