diff options
| author | Boxy <supbscripter@gmail.com> | 2022-11-17 21:09:59 +0000 |
|---|---|---|
| committer | Boxy <supbscripter@gmail.com> | 2022-11-18 13:25:17 +0000 |
| commit | 3fca95a5976aa89612869203f7ffe857d689b033 (patch) | |
| tree | cf2bec8c4bc1bc589a81956959faa397d9fd3ca9 | |
| parent | 95a267bb345dcb13b52a66e322d730414996e439 (diff) | |
| download | rust-3fca95a5976aa89612869203f7ffe857d689b033.tar.gz rust-3fca95a5976aa89612869203f7ffe857d689b033.zip | |
`track_errors` use a delay_span_bug
| -rw-r--r-- | compiler/rustc_session/src/session.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/rustc_session/src/session.rs b/compiler/rustc_session/src/session.rs index 10352198357..d602acec53e 100644 --- a/compiler/rustc_session/src/session.rs +++ b/compiler/rustc_session/src/session.rs @@ -562,7 +562,10 @@ impl Session { if self.err_count() == old_count { Ok(result) } 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)] |
