Skip to content

Commit 541e2f9

Browse files
committed
delete useless pub detect during check unused
1 parent 10570e9 commit 541e2f9

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

compiler/rustc_resolve/src/check_unused.rs

-3
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ struct UnusedImportCheckVisitor<'a, 'b, 'tcx> {
5959
base_use_tree: Option<&'a ast::UseTree>,
6060
base_id: ast::NodeId,
6161
item_span: Span,
62-
base_use_is_pub: bool,
6362
}
6463

6564
struct ExternCrateToLint {
@@ -146,7 +145,6 @@ impl<'a, 'b, 'tcx> Visitor<'a> for UnusedImportCheckVisitor<'a, 'b, 'tcx> {
146145
// because this means that they were generated in some fashion by the
147146
// compiler and we don't need to consider them.
148147
ast::ItemKind::Use(..) if item.span.is_dummy() => return,
149-
ast::ItemKind::Use(..) => self.base_use_is_pub = item.vis.kind.is_pub(),
150148
ast::ItemKind::ExternCrate(orig_name) => {
151149
self.extern_crate_items.push(ExternCrateToLint {
152150
id: item.id,
@@ -332,7 +330,6 @@ impl Resolver<'_, '_> {
332330
base_use_tree: None,
333331
base_id: ast::DUMMY_NODE_ID,
334332
item_span: DUMMY_SP,
335-
base_use_is_pub: false,
336333
};
337334
visit::walk_crate(&mut visitor, krate);
338335

0 commit comments

Comments
 (0)