X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;ds=sidebyside;f=compiler%2Frustc_expand%2Fsrc%2Fbase.rs;h=1e57d66dd9f5619dd8558574b74a3900cea5771f;hb=a3bdd46431d0baf25c2bef85a05fd6c1238459c7;hp=245719bff120216eae37a08b0a1ee051375a8e85;hpb=00ce47209dfdd8ef8871c6ec804f0e0e04d10702;p=rust.git diff --git a/compiler/rustc_expand/src/base.rs b/compiler/rustc_expand/src/base.rs index 245719bff12..1e57d66dd9f 100644 --- a/compiler/rustc_expand/src/base.rs +++ b/compiler/rustc_expand/src/base.rs @@ -1077,6 +1077,7 @@ pub fn expansion_cause(&self) -> Option { self.current_expansion.id.expansion_cause() } + #[cfg_attr(not(bootstrap), rustc_lint_diagnostics)] pub fn struct_span_err>( &self, sp: S, @@ -1101,9 +1102,11 @@ pub fn emit_err(&self, err: impl SessionDiagnostic<'a>) -> ErrorGuaranteed { /// /// Compilation will be stopped in the near future (at the end of /// the macro expansion phase). + #[cfg_attr(not(bootstrap), rustc_lint_diagnostics)] pub fn span_err>(&self, sp: S, msg: &str) { self.sess.parse_sess.span_diagnostic.span_err(sp, msg); } + #[cfg_attr(not(bootstrap), rustc_lint_diagnostics)] pub fn span_warn>(&self, sp: S, msg: &str) { self.sess.parse_sess.span_diagnostic.span_warn(sp, msg); }