@@ -218,7 +218,7 @@ use std::ops::Deref;
218218use std:: path:: { Path , PathBuf } ;
219219use std:: { cmp, fmt} ;
220220
221- use rustc_data_structures:: fx:: { FxHashMap , FxHashSet } ;
221+ use rustc_data_structures:: fx:: { FxHashSet , FxIndexMap } ;
222222use rustc_data_structures:: memmap:: Mmap ;
223223use rustc_data_structures:: owned_slice:: slice_owned;
224224use rustc_data_structures:: svh:: Svh ;
@@ -385,7 +385,7 @@ impl<'a> CrateLocator<'a> {
385385 let dylib_suffix = & self . target . dll_suffix ;
386386 let staticlib_suffix = & self . target . staticlib_suffix ;
387387
388- let mut candidates: FxHashMap < _ , ( FxHashMap < _ , _ > , FxHashMap < _ , _ > , FxHashMap < _ , _ > ) > =
388+ let mut candidates: FxIndexMap < _ , ( FxIndexMap < _ , _ > , FxIndexMap < _ , _ > , FxIndexMap < _ , _ > ) > =
389389 Default :: default ( ) ;
390390
391391 // First, find all possible candidate rlibs and dylibs purely based on
@@ -460,7 +460,7 @@ impl<'a> CrateLocator<'a> {
460460 // A Library candidate is created if the metadata for the set of
461461 // libraries corresponds to the crate id and hash criteria that this
462462 // search is being performed for.
463- let mut libraries = FxHashMap :: default ( ) ;
463+ let mut libraries = FxIndexMap :: default ( ) ;
464464 for ( _hash, ( rlibs, rmetas, dylibs) ) in candidates {
465465 if let Some ( ( svh, lib) ) = self . extract_lib ( rlibs, rmetas, dylibs) ? {
466466 libraries. insert ( svh, lib) ;
@@ -494,9 +494,9 @@ impl<'a> CrateLocator<'a> {
494494
495495 fn extract_lib (
496496 & mut self ,
497- rlibs : FxHashMap < PathBuf , PathKind > ,
498- rmetas : FxHashMap < PathBuf , PathKind > ,
499- dylibs : FxHashMap < PathBuf , PathKind > ,
497+ rlibs : FxIndexMap < PathBuf , PathKind > ,
498+ rmetas : FxIndexMap < PathBuf , PathKind > ,
499+ dylibs : FxIndexMap < PathBuf , PathKind > ,
500500 ) -> Result < Option < ( Svh , Library ) > , CrateError > {
501501 let mut slot = None ;
502502 // Order here matters, rmeta should come first. See comment in
@@ -534,7 +534,7 @@ impl<'a> CrateLocator<'a> {
534534 // The `PathBuf` in `slot` will only be used for diagnostic purposes.
535535 fn extract_one (
536536 & mut self ,
537- m : FxHashMap < PathBuf , PathKind > ,
537+ m : FxIndexMap < PathBuf , PathKind > ,
538538 flavor : CrateFlavor ,
539539 slot : & mut Option < ( Svh , MetadataBlob , PathBuf ) > ,
540540 ) -> Result < Option < ( PathBuf , PathKind ) > , CrateError > {
@@ -702,9 +702,9 @@ impl<'a> CrateLocator<'a> {
702702 // First, filter out all libraries that look suspicious. We only accept
703703 // files which actually exist that have the correct naming scheme for
704704 // rlibs/dylibs.
705- let mut rlibs = FxHashMap :: default ( ) ;
706- let mut rmetas = FxHashMap :: default ( ) ;
707- let mut dylibs = FxHashMap :: default ( ) ;
705+ let mut rlibs = FxIndexMap :: default ( ) ;
706+ let mut rmetas = FxIndexMap :: default ( ) ;
707+ let mut dylibs = FxIndexMap :: default ( ) ;
708708 for loc in & self . exact_paths {
709709 if !loc. canonicalized ( ) . exists ( ) {
710710 return Err ( CrateError :: ExternLocationNotExist (
0 commit comments