diff options
| author | Elliot Roberts <Elliot0000101@gmail.com> | 2022-05-31 16:59:28 -0700 |
|---|---|---|
| committer | Elliot Roberts <Elliot0000101@gmail.com> | 2022-06-04 12:38:55 -0700 |
| commit | 76c6845a8592931edd1e80dbccfd8cbd047e4f2b (patch) | |
| tree | ec5fbf154bd8c65fa19ec853688af85abbf5542f /compiler/rustc_resolve | |
| parent | 6f481f8b715c6a26e43a86407e8839d7bf9a62f8 (diff) | |
| download | rust-76c6845a8592931edd1e80dbccfd8cbd047e4f2b.tar.gz rust-76c6845a8592931edd1e80dbccfd8cbd047e4f2b.zip | |
Iterate over `maybe_unused_trait_imports` when checking dead trait imports
Diffstat (limited to 'compiler/rustc_resolve')
| -rw-r--r-- | compiler/rustc_resolve/src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_resolve/src/lib.rs b/compiler/rustc_resolve/src/lib.rs index 73c8a9d28bd..49c15d2c9ef 100644 --- a/compiler/rustc_resolve/src/lib.rs +++ b/compiler/rustc_resolve/src/lib.rs @@ -28,7 +28,7 @@ use rustc_ast::node_id::NodeMap; use rustc_ast::{self as ast, NodeId, CRATE_NODE_ID}; use rustc_ast::{AngleBracketedArg, Crate, Expr, ExprKind, GenericArg, GenericArgs, LitKind, Path}; use rustc_ast_lowering::{LifetimeRes, ResolverAstLowering}; -use rustc_data_structures::fx::{FxHashMap, FxHashSet, FxIndexMap}; +use rustc_data_structures::fx::{FxHashMap, FxHashSet, FxIndexMap, FxIndexSet}; use rustc_data_structures::intern::Interned; use rustc_data_structures::sync::Lrc; use rustc_errors::{Applicability, DiagnosticBuilder, ErrorGuaranteed}; @@ -941,7 +941,7 @@ pub struct Resolver<'a> { visibilities: FxHashMap<LocalDefId, ty::Visibility>, has_pub_restricted: bool, used_imports: FxHashSet<NodeId>, - maybe_unused_trait_imports: FxHashSet<LocalDefId>, + maybe_unused_trait_imports: FxIndexSet<LocalDefId>, maybe_unused_extern_crates: Vec<(LocalDefId, Span)>, /// Privacy errors are delayed until the end in order to deduplicate them. |
