mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 00:34:06 +00:00
Rollup merge of #112396 - WaffleLapkin:track_more_diagnostics, r=compiler-errors
Track more diagnostics in `rustc_expand` I wish we could lint this somehow...
This commit is contained in:
commit
b3d1a83311
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user