track_errors
use a delay_span_bug
This commit is contained in:
parent
95a267bb34
commit
3fca95a597
1 changed files with 4 additions and 1 deletions
|
@ -562,7 +562,10 @@ impl Session {
|
||||||
if self.err_count() == old_count {
|
if self.err_count() == old_count {
|
||||||
Ok(result)
|
Ok(result)
|
||||||
} else {
|
} else {
|
||||||
Err(ErrorGuaranteed::unchecked_claim_error_was_emitted())
|
Err(self.delay_span_bug(
|
||||||
|
rustc_span::DUMMY_SP,
|
||||||
|
"`self.err_count()` changed but an error was not emitted",
|
||||||
|
))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#[allow(rustc::untranslatable_diagnostic)]
|
#[allow(rustc::untranslatable_diagnostic)]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue