@@ -4,7 +4,7 @@ use std::cell::Cell;
4
4
use std:: mem;
5
5
6
6
use rustc_ast:: NodeId ;
7
- use rustc_data_structures:: fx:: { FxHashSet , FxIndexSet } ;
7
+ use rustc_data_structures:: fx:: FxHashSet ;
8
8
use rustc_data_structures:: intern:: Interned ;
9
9
use rustc_errors:: codes:: * ;
10
10
use rustc_errors:: { Applicability , MultiSpan , pluralize, struct_span_code_err} ;
@@ -220,7 +220,7 @@ impl<'ra> ImportData<'ra> {
220
220
pub ( crate ) struct NameResolution < ' ra > {
221
221
/// Single imports that may define the name in the namespace.
222
222
/// Imports are arena-allocated, so it's ok to use pointers as keys.
223
- pub single_imports : FxIndexSet < Import < ' ra > > ,
223
+ pub single_imports : FxHashSet < Import < ' ra > > ,
224
224
/// The least shadowable known binding for this name, or None if there are no known bindings.
225
225
pub binding : Option < NameBinding < ' ra > > ,
226
226
pub shadowed_glob : Option < NameBinding < ' ra > > ,
@@ -482,7 +482,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
482
482
let key = BindingKey :: new ( target, ns) ;
483
483
let _ = this. try_define ( import. parent_scope . module , key, dummy_binding, false ) ;
484
484
this. update_resolution ( import. parent_scope . module , key, false , |_, resolution| {
485
- resolution. single_imports . shift_remove ( & import) ;
485
+ resolution. single_imports . remove ( & import) ;
486
486
} )
487
487
} ) ;
488
488
self . record_use ( target, dummy_binding, Used :: Other ) ;
@@ -837,7 +837,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
837
837
}
838
838
let key = BindingKey :: new ( target, ns) ;
839
839
this. update_resolution ( parent, key, false , |_, resolution| {
840
- resolution. single_imports . shift_remove ( & import) ;
840
+ resolution. single_imports . remove ( & import) ;
841
841
} ) ;
842
842
}
843
843
}
0 commit comments