From 0d0546a2364641d8ca9c840b70b437be038b8c9b Mon Sep 17 00:00:00 2001 From: Aaron Hill Date: Thu, 6 Aug 2020 11:34:13 -0400 Subject: [PATCH] Add #[track_caller] to `Session::delay_span_bug` This forwards the caller span to `Handler::delay_span_bug` --- src/librustc_session/session.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/librustc_session/session.rs b/src/librustc_session/session.rs index e9077f40859..cf94ff8b929 100644 --- a/src/librustc_session/session.rs +++ b/src/librustc_session/session.rs @@ -432,6 +432,7 @@ pub fn opt_span_warn>(&self, opt_sp: Option, msg: &str) { } } /// Delay a span_bug() call until abort_if_errors() + #[track_caller] pub fn delay_span_bug>(&self, sp: S, msg: &str) { self.diagnostic().delay_span_bug(sp, msg) }