Skip to content

Commit 576c7c9

Browse files
committed
remove ExtCxt::struct_span_warn
1 parent a98ea5a commit 576c7c9

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/librustc_expand/base.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,9 +1007,6 @@ impl<'a> ExtCtxt<'a> {
10071007
self.current_expansion.id.expansion_cause()
10081008
}
10091009

1010-
pub fn struct_span_warn<S: Into<MultiSpan>>(&self, sp: S, msg: &str) -> DiagnosticBuilder<'a> {
1011-
self.parse_sess.span_diagnostic.struct_span_warn(sp, msg)
1012-
}
10131010
pub fn struct_span_err<S: Into<MultiSpan>>(&self, sp: S, msg: &str) -> DiagnosticBuilder<'a> {
10141011
self.parse_sess.span_diagnostic.struct_span_err(sp, msg)
10151012
}

src/librustc_expand/expand.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1137,6 +1137,8 @@ impl<'a, 'b> InvocationCollector<'a, 'b> {
11371137
// macros are expanded before any lint passes so this warning has to be hardcoded
11381138
if attr.has_name(sym::derive) {
11391139
self.cx
1140+
.parse_sess()
1141+
.span_diagnostic
11401142
.struct_span_warn(attr.span, "`#[derive]` does nothing on macro invocations")
11411143
.note("this may become a hard error in a future release")
11421144
.emit();

0 commit comments

Comments
 (0)