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:
parent
3c4f1d85af
commit
2ea7a37e11
27 changed files with 103 additions and 146 deletions
|
@ -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"))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue