diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2023-06-08 10:15:13 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-08 10:15:13 +0200 |
| commit | b3d1a8331180df3a5efaf3e0f2ccac0013059402 (patch) | |
| tree | 0e87cd497fdc17ae77efbd2554dee04866aab5ef /compiler/rustc_expand/src | |
| parent | 80c26483ba813c6bd94395b9f9883d51c02c3425 (diff) | |
| parent | c38d80ee9f4fde1596ae4bff0733c3ec045e2f3e (diff) | |
| download | rust-b3d1a8331180df3a5efaf3e0f2ccac0013059402.tar.gz rust-b3d1a8331180df3a5efaf3e0f2ccac0013059402.zip | |
Rollup merge of #112396 - WaffleLapkin:track_more_diagnostics, r=compiler-errors
Track more diagnostics in `rustc_expand` I wish we could lint this somehow...
Diffstat (limited to 'compiler/rustc_expand/src')
| -rw-r--r-- | compiler/rustc_expand/src/base.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_expand/src/base.rs b/compiler/rustc_expand/src/base.rs index b7c30841983..8a251ea29d7 100644 --- a/compiler/rustc_expand/src/base.rs +++ b/compiler/rustc_expand/src/base.rs @@ -1110,6 +1110,7 @@ impl<'a> ExtCtxt<'a> { } #[rustc_lint_diagnostics] + #[track_caller] pub fn struct_span_err<S: Into<MultiSpan>>( &self, sp: S, @@ -1118,6 +1119,7 @@ impl<'a> ExtCtxt<'a> { self.sess.parse_sess.span_diagnostic.struct_span_err(sp, msg) } + #[track_caller] pub fn create_err( &self, err: impl IntoDiagnostic<'a>, @@ -1125,6 +1127,7 @@ impl<'a> ExtCtxt<'a> { self.sess.create_err(err) } + #[track_caller] pub fn emit_err(&self, err: impl IntoDiagnostic<'a>) -> ErrorGuaranteed { self.sess.emit_err(err) } @@ -1135,10 +1138,12 @@ impl<'a> ExtCtxt<'a> { /// Compilation will be stopped in the near future (at the end of /// the macro expansion phase). #[rustc_lint_diagnostics] + #[track_caller] pub fn span_err<S: Into<MultiSpan>>(&self, sp: S, msg: impl Into<DiagnosticMessage>) { self.sess.parse_sess.span_diagnostic.span_err(sp, msg); } #[rustc_lint_diagnostics] + #[track_caller] pub fn span_warn<S: Into<MultiSpan>>(&self, sp: S, msg: impl Into<DiagnosticMessage>) { self.sess.parse_sess.span_diagnostic.span_warn(sp, msg); } |
