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 @@ impl Diagnostic {
|
|||||||
#[track_caller]
|
#[track_caller]
|
||||||
pub fn downgrade_to_delayed_bug(&mut self) {
|
pub fn downgrade_to_delayed_bug(&mut self) {
|
||||||
assert!(
|
assert!(
|
||||||
self.is_error(),
|
matches!(self.level, Level::Error | Level::DelayedBug(_)),
|
||||||
"downgrade_to_delayed_bug: cannot downgrade {:?} to DelayedBug: not an error",
|
"downgrade_to_delayed_bug: cannot downgrade {:?} to DelayedBug: not an error",
|
||||||
self.level
|
self.level
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user