1
Fork 0

Add DiagCtxt::delayed_bug.

We have `span_delayed_bug` and often pass it a `DUMMY_SP`. This commit
adds `delayed_bug`, which matches pairs like `err`/`span_err` and
`warn`/`span_warn`.
This commit is contained in:
Nicholas Nethercote 2024-01-04 12:54:23 +11:00
parent 3c4f1d85af
commit 2ea7a37e11
27 changed files with 103 additions and 146 deletions

View file

@ -341,10 +341,7 @@ impl Session {
if self.dcx().err_count() == old_count {
Ok(result)
} else {
Err(self.dcx().span_delayed_bug(
rustc_span::DUMMY_SP,
"`self.err_count()` changed but an error was not emitted",
))
Err(self.dcx().delayed_bug("`self.err_count()` changed but an error was not emitted"))
}
}