@@ -4,7 +4,7 @@ use std::cell::Cell;
44use std:: mem;
55
66use rustc_ast:: NodeId ;
7- use rustc_data_structures:: fx:: { FxHashSet , FxIndexSet } ;
7+ use rustc_data_structures:: fx:: FxHashSet ;
88use rustc_data_structures:: intern:: Interned ;
99use rustc_errors:: codes:: * ;
1010use rustc_errors:: { Applicability , MultiSpan , pluralize, struct_span_code_err} ;
@@ -220,7 +220,7 @@ impl<'ra> ImportData<'ra> {
220220pub ( crate ) struct NameResolution < ' ra > {
221221 /// Single imports that may define the name in the namespace.
222222 /// 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 > > ,
224224 /// The least shadowable known binding for this name, or None if there are no known bindings.
225225 pub binding : Option < NameBinding < ' ra > > ,
226226 pub shadowed_glob : Option < NameBinding < ' ra > > ,
@@ -482,7 +482,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
482482 let key = BindingKey :: new ( target, ns) ;
483483 let _ = this. try_define ( import. parent_scope . module , key, dummy_binding, false ) ;
484484 this. update_resolution ( import. parent_scope . module , key, false , |_, resolution| {
485- resolution. single_imports . shift_remove ( & import) ;
485+ resolution. single_imports . remove ( & import) ;
486486 } )
487487 } ) ;
488488 self . record_use ( target, dummy_binding, Used :: Other ) ;
@@ -837,7 +837,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
837837 }
838838 let key = BindingKey :: new ( target, ns) ;
839839 this. update_resolution ( parent, key, false , |_, resolution| {
840- resolution. single_imports . shift_remove ( & import) ;
840+ resolution. single_imports . remove ( & import) ;
841841 } ) ;
842842 }
843843 }
0 commit comments