Skip to content

Commit cfe5c3c

Browse files
committed
Add #[track_caller] to struct_span_err_with_code (drive-by cleanup)
We use caller information to track where a diagnostic was created, so all "helper" diagnostic functions should use `#[track_caller]`
1 parent ceabcd8 commit cfe5c3c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

compiler/rustc_borrowck/src/borrowck_errors.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,7 @@ impl<'cx, 'tcx> crate::MirBorrowckCtxt<'cx, 'tcx> {
469469
}
470470

471471
#[rustc_lint_diagnostics]
472+
#[track_caller]
472473
pub(crate) fn struct_span_err_with_code<S: Into<MultiSpan>>(
473474
&self,
474475
sp: S,

0 commit comments

Comments
 (0)