@@ -6,7 +6,7 @@ use std::ops::{Deref, DerefMut};
66use rustc_abi:: { ExternAbi , Size } ;
77use rustc_apfloat:: Float ;
88use rustc_apfloat:: ieee:: { Double , Half , Quad , Single } ;
9- use rustc_data_structures:: fx:: { FxHashMap , FxIndexMap } ;
9+ use rustc_data_structures:: fx:: { FxIndexMap , IndexEntry } ;
1010use rustc_data_structures:: unord:: UnordMap ;
1111use rustc_hir as hir;
1212use rustc_hir:: LangItem ;
@@ -3489,8 +3489,8 @@ pub fn trimmed_def_paths(tcx: TyCtxt<'_>, (): ()) -> DefIdMap<Symbol> {
34893489
34903490 // Once constructed, unique namespace+symbol pairs will have a `Some(_)` entry, while
34913491 // non-unique pairs will have a `None` entry.
3492- let unique_symbols_rev: & mut FxHashMap < ( Namespace , Symbol ) , Option < DefId > > =
3493- & mut FxHashMap :: default ( ) ;
3492+ let unique_symbols_rev: & mut FxIndexMap < ( Namespace , Symbol ) , Option < DefId > > =
3493+ & mut FxIndexMap :: default ( ) ;
34943494
34953495 for symbol_set in tcx. resolutions ( ( ) ) . glob_map . values ( ) {
34963496 for symbol in symbol_set {
@@ -3501,26 +3501,24 @@ pub fn trimmed_def_paths(tcx: TyCtxt<'_>, (): ()) -> DefIdMap<Symbol> {
35013501 }
35023502
35033503 for_each_def ( tcx, |ident, ns, def_id| {
3504- use std:: collections:: hash_map:: Entry :: { Occupied , Vacant } ;
3505-
35063504 match unique_symbols_rev. entry ( ( ns, ident. name ) ) {
3507- Occupied ( mut v) => match v. get ( ) {
3505+ IndexEntry :: Occupied ( mut v) => match v. get ( ) {
35083506 None => { }
35093507 Some ( existing) => {
35103508 if * existing != def_id {
35113509 v. insert ( None ) ;
35123510 }
35133511 }
35143512 } ,
3515- Vacant ( v) => {
3513+ IndexEntry :: Vacant ( v) => {
35163514 v. insert ( Some ( def_id) ) ;
35173515 }
35183516 }
35193517 } ) ;
35203518
35213519 // Put the symbol from all the unique namespace+symbol pairs into `map`.
35223520 let mut map: DefIdMap < Symbol > = Default :: default ( ) ;
3523- for ( ( _, symbol) , opt_def_id) in unique_symbols_rev. drain ( ) {
3521+ for ( ( _, symbol) , opt_def_id) in unique_symbols_rev. drain ( .. ) {
35243522 use std:: collections:: hash_map:: Entry :: { Occupied , Vacant } ;
35253523
35263524 if let Some ( def_id) = opt_def_id {
0 commit comments