about summary refs log tree commit diff
path: root/compiler/rustc_errors/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-02-08 20:35:00 +0100
committerGitHub <noreply@github.com>2024-02-08 20:35:00 +0100
commit1db56fbe818ef01b8e437c91ff21a0cd25c791df (patch)
tree07ff52e9696562274968b7bfb18a8d8de882956e /compiler/rustc_errors/src
parent3e523f6d3c252f17a315db68ecc9b962858b45fa (diff)
parent7dc182d5d405a08ecdb4d652e10c6b6f183d61e7 (diff)
downloadrust-1db56fbe818ef01b8e437c91ff21a0cd25c791df.tar.gz
rust-1db56fbe818ef01b8e437c91ff21a0cd25c791df.zip
Rollup merge of #120782 - oli-obk:track_errors8, r=WaffleLapkin
Fix mir pass ICE in the presence of other errors

fixes #120779

it is impossible to add a ui test for this, because it only reproduces in build-fail, but a test that also has errors in check-fail mode can't be made build-fail 🙃

I would have to add a run-make test or sth, which is overkill for such a tiny thing imo.
Diffstat (limited to 'compiler/rustc_errors/src')
-rw-r--r--compiler/rustc_errors/src/lib.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs
index 9c5a91adfa0..b6f8dab7e1a 100644
--- a/compiler/rustc_errors/src/lib.rs
+++ b/compiler/rustc_errors/src/lib.rs
@@ -847,6 +847,7 @@ impl DiagCtxt {
         self.struct_span_warn(span, msg).emit()
     }
 
+    #[track_caller]
     pub fn span_bug(&self, span: impl Into<MultiSpan>, msg: impl Into<DiagnosticMessage>) -> ! {
         self.struct_span_bug(span, msg).emit()
     }