We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eb2226b commit f1860d1Copy full SHA for f1860d1
1 file changed
compiler/rustc_resolve/src/check_unused.rs
@@ -98,7 +98,7 @@ impl<'a, 'b> UnusedImportCheckVisitor<'a, 'b> {
98
99
impl<'a, 'b> Visitor<'a> for UnusedImportCheckVisitor<'a, 'b> {
100
fn visit_item(&mut self, item: &'a ast::Item) {
101
- self.item_span = item.span;
+ self.item_span = item.span_with_attributes();
102
103
// Ignore is_public import statements because there's no way to be sure
104
// whether they're used or not. Also ignore imports with a dummy span
0 commit comments