Skip to content

Commit ad26401

Browse files
committed
remove ExtCxt::struct_span_warn
1 parent c1ef1b3 commit ad26401

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
@@ -1014,9 +1014,6 @@ impl<'a> ExtCtxt<'a> {
10141014
self.current_expansion.id.expansion_cause()
10151015
}
10161016

1017-
pub fn struct_span_warn<S: Into<MultiSpan>>(&self, sp: S, msg: &str) -> DiagnosticBuilder<'a> {
1018-
self.parse_sess.span_diagnostic.struct_span_warn(sp, msg)
1019-
}
10201017
pub fn struct_span_err<S: Into<MultiSpan>>(&self, sp: S, msg: &str) -> DiagnosticBuilder<'a> {
10211018
self.parse_sess.span_diagnostic.struct_span_err(sp, msg)
10221019
}

src/librustc_expand/expand.rs

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

0 commit comments

Comments
 (0)