Remove forward for downgrade_to_delayed_bug.

It's not used, and doesn't quite fit the general pattern.

Also, `Diagnostic::downgrade_to_delayed_bug` doesn't need to return
`&mut Self` for the same reason.
This commit is contained in:
Nicholas Nethercote
2024-01-03 14:27:35 +11:00
parent 5fe5d5da4e
commit 096b844a2b
2 changed files with 1 additions and 8 deletions

View File

@@ -311,15 +311,13 @@ impl Diagnostic {
/// In the meantime, though, callsites are required to deal with the "bug"
/// locally in whichever way makes the most sense.
#[track_caller]
pub fn downgrade_to_delayed_bug(&mut self) -> &mut Self {
pub fn downgrade_to_delayed_bug(&mut self) {
assert!(
self.is_error(),
"downgrade_to_delayed_bug: cannot downgrade {:?} to DelayedBug: not an error",
self.level
);
self.level = Level::DelayedBug;
self
}
/// Adds a span/label to be included in the resulting snippet.