remove ExtCxt::struct_span_warn
This commit is contained in:
parent
c1ef1b3bca
commit
ad26401dc1
|
@ -1014,9 +1014,6 @@ impl<'a> ExtCtxt<'a> {
|
|||
self.current_expansion.id.expansion_cause()
|
||||
}
|
||||
|
||||
pub fn struct_span_warn<S: Into<MultiSpan>>(&self, sp: S, msg: &str) -> DiagnosticBuilder<'a> {
|
||||
self.parse_sess.span_diagnostic.struct_span_warn(sp, msg)
|
||||
}
|
||||
pub fn struct_span_err<S: Into<MultiSpan>>(&self, sp: S, msg: &str) -> DiagnosticBuilder<'a> {
|
||||
self.parse_sess.span_diagnostic.struct_span_err(sp, msg)
|
||||
}
|
||||
|
|
|
@ -1145,6 +1145,8 @@ impl<'a, 'b> InvocationCollector<'a, 'b> {
|
|||
// macros are expanded before any lint passes so this warning has to be hardcoded
|
||||
if attr.has_name(sym::derive) {
|
||||
self.cx
|
||||
.parse_sess()
|
||||
.span_diagnostic
|
||||
.struct_span_warn(attr.span, "`#[derive]` does nothing on macro invocations")
|
||||
.note("this may become a hard error in a future release")
|
||||
.emit();
|
||||
|
|
Loading…
Reference in New Issue