Shorten Span of unused macro lints
The span has been recuded to the actual ident, instead of linting the *whole* macro.
This commit is contained in:
parent
9dbbbb12c0
commit
9f6ca7482c
7 changed files with 41 additions and 62 deletions
|
@ -315,8 +315,13 @@ impl<'a> ResolverExpand for Resolver<'a> {
|
|||
}
|
||||
|
||||
fn check_unused_macros(&mut self) {
|
||||
for (_, &(node_id, span)) in self.unused_macros.iter() {
|
||||
self.lint_buffer.buffer_lint(UNUSED_MACROS, node_id, span, "unused macro definition");
|
||||
for (_, &(node_id, ident)) in self.unused_macros.iter() {
|
||||
self.lint_buffer.buffer_lint(
|
||||
UNUSED_MACROS,
|
||||
node_id,
|
||||
ident.span,
|
||||
&format!("unused macro definition: `{}`", ident.as_str()),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue