From 6af2d3cc90f7625ad3db4687a93abebfa9e8396a Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Thu, 8 Feb 2024 14:44:52 +0000 Subject: [PATCH] Fix `span_bug!` backtraces --- compiler/rustc_errors/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs index 9c5a91adfa091..b6f8dab7e1a22 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, msg: impl Into) -> ! { self.struct_span_bug(span, msg).emit() }