Skip to content

Commit b3d1a83

Browse files
Rollup merge of #112396 - WaffleLapkin:track_more_diagnostics, r=compiler-errors
Track more diagnostics in `rustc_expand` I wish we could lint this somehow...
2 parents 80c2648 + c38d80e commit b3d1a83

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: compiler/rustc_expand/src/base.rs

+5
Original file line numberDiff line numberDiff line change
@@ -1110,6 +1110,7 @@ impl<'a> ExtCtxt<'a> {
11101110
}
11111111

11121112
#[rustc_lint_diagnostics]
1113+
#[track_caller]
11131114
pub fn struct_span_err<S: Into<MultiSpan>>(
11141115
&self,
11151116
sp: S,
@@ -1118,13 +1119,15 @@ impl<'a> ExtCtxt<'a> {
11181119
self.sess.parse_sess.span_diagnostic.struct_span_err(sp, msg)
11191120
}
11201121

1122+
#[track_caller]
11211123
pub fn create_err(
11221124
&self,
11231125
err: impl IntoDiagnostic<'a>,
11241126
) -> DiagnosticBuilder<'a, ErrorGuaranteed> {
11251127
self.sess.create_err(err)
11261128
}
11271129

1130+
#[track_caller]
11281131
pub fn emit_err(&self, err: impl IntoDiagnostic<'a>) -> ErrorGuaranteed {
11291132
self.sess.emit_err(err)
11301133
}
@@ -1135,10 +1138,12 @@ impl<'a> ExtCtxt<'a> {
11351138
/// Compilation will be stopped in the near future (at the end of
11361139
/// the macro expansion phase).
11371140
#[rustc_lint_diagnostics]
1141+
#[track_caller]
11381142
pub fn span_err<S: Into<MultiSpan>>(&self, sp: S, msg: impl Into<DiagnosticMessage>) {
11391143
self.sess.parse_sess.span_diagnostic.span_err(sp, msg);
11401144
}
11411145
#[rustc_lint_diagnostics]
1146+
#[track_caller]
11421147
pub fn span_warn<S: Into<MultiSpan>>(&self, sp: S, msg: impl Into<DiagnosticMessage>) {
11431148
self.sess.parse_sess.span_diagnostic.span_warn(sp, msg);
11441149
}

0 commit comments

Comments
 (0)