Include attributes in removal span for unused imports.
This commit is contained in:
parent
eb2226b1f1
commit
f1860d1901
1 changed files with 1 additions and 1 deletions
|
@ -98,7 +98,7 @@ impl<'a, 'b> UnusedImportCheckVisitor<'a, 'b> {
|
|||
|
||||
impl<'a, 'b> Visitor<'a> for UnusedImportCheckVisitor<'a, 'b> {
|
||||
fn visit_item(&mut self, item: &'a ast::Item) {
|
||||
self.item_span = item.span;
|
||||
self.item_span = item.span_with_attributes();
|
||||
|
||||
// Ignore is_public import statements because there's no way to be sure
|
||||
// whether they're used or not. Also ignore imports with a dummy span
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue