diff --git a/compiler/rustc_lint/src/context.rs b/compiler/rustc_lint/src/context.rs index bfeef4904893a..9d9923b7d0e88 100644 --- a/compiler/rustc_lint/src/context.rs +++ b/compiler/rustc_lint/src/context.rs @@ -261,6 +261,7 @@ impl LintStore { } } + #[track_caller] pub fn register_renamed(&mut self, old_name: &str, new_name: &str) { let target = match self.by_name.get(new_name) { Some(&Id(lint_id)) => lint_id, diff --git a/compiler/rustc_middle/src/util/bug.rs b/compiler/rustc_middle/src/util/bug.rs index 0903ef5089861..e79adcdb54598 100644 --- a/compiler/rustc_middle/src/util/bug.rs +++ b/compiler/rustc_middle/src/util/bug.rs @@ -21,6 +21,7 @@ pub fn span_bug_fmt>(span: S, args: fmt::Arguments<'_>) -> ! opt_span_bug_fmt(Some(span), args, Location::caller()); } +#[track_caller] fn opt_span_bug_fmt>( span: Option, args: fmt::Arguments<'_>,