Use UnordMap instead of FxHashMap in define_id_collections!().
This commit is contained in:
parent
8a1de57a4a
commit
c3d2573120
15 changed files with 253 additions and 102 deletions
|
@ -28,9 +28,9 @@ use crate::module_to_string;
|
|||
use crate::Resolver;
|
||||
|
||||
use rustc_ast as ast;
|
||||
use rustc_ast::node_id::NodeMap;
|
||||
use rustc_ast::visit::{self, Visitor};
|
||||
use rustc_data_structures::fx::FxHashSet;
|
||||
use rustc_data_structures::fx::FxIndexMap;
|
||||
use rustc_data_structures::unord::UnordSet;
|
||||
use rustc_errors::{pluralize, MultiSpan};
|
||||
use rustc_session::lint::builtin::{MACRO_USE_EXTERN_CRATE, UNUSED_IMPORTS};
|
||||
use rustc_session::lint::BuiltinLintDiagnostics;
|
||||
|
@ -40,7 +40,7 @@ struct UnusedImport<'a> {
|
|||
use_tree: &'a ast::UseTree,
|
||||
use_tree_id: ast::NodeId,
|
||||
item_span: Span,
|
||||
unused: FxHashSet<ast::NodeId>,
|
||||
unused: UnordSet<ast::NodeId>,
|
||||
}
|
||||
|
||||
impl<'a> UnusedImport<'a> {
|
||||
|
@ -52,7 +52,7 @@ impl<'a> UnusedImport<'a> {
|
|||
struct UnusedImportCheckVisitor<'a, 'b> {
|
||||
r: &'a mut Resolver<'b>,
|
||||
/// All the (so far) unused imports, grouped path list
|
||||
unused_imports: NodeMap<UnusedImport<'a>>,
|
||||
unused_imports: FxIndexMap<ast::NodeId, UnusedImport<'a>>,
|
||||
base_use_tree: Option<&'a ast::UseTree>,
|
||||
base_id: ast::NodeId,
|
||||
item_span: Span,
|
||||
|
@ -89,7 +89,7 @@ impl<'a, 'b> UnusedImportCheckVisitor<'a, 'b> {
|
|||
use_tree,
|
||||
use_tree_id,
|
||||
item_span,
|
||||
unused: FxHashSet::default(),
|
||||
unused: Default::default(),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue