Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 3fca95a

Browse files
committed
track_errors use a delay_span_bug
1 parent 95a267b commit 3fca95a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

compiler/rustc_session/src/session.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,10 @@ impl Session {
562562
if self.err_count() == old_count {
563563
Ok(result)
564564
} else {
565-
Err(ErrorGuaranteed::unchecked_claim_error_was_emitted())
565+
Err(self.delay_span_bug(
566+
rustc_span::DUMMY_SP,
567+
"`self.err_count()` changed but an error was not emitted",
568+
))
566569
}
567570
}
568571
#[allow(rustc::untranslatable_diagnostic)]

0 commit comments

Comments
 (0)