@@ -218,7 +218,7 @@ use std::ops::Deref;
218
218
use std:: path:: { Path , PathBuf } ;
219
219
use std:: { cmp, fmt} ;
220
220
221
- use rustc_data_structures:: fx:: { FxHashMap , FxHashSet } ;
221
+ use rustc_data_structures:: fx:: { FxHashSet , FxIndexMap } ;
222
222
use rustc_data_structures:: memmap:: Mmap ;
223
223
use rustc_data_structures:: owned_slice:: slice_owned;
224
224
use rustc_data_structures:: svh:: Svh ;
@@ -385,7 +385,7 @@ impl<'a> CrateLocator<'a> {
385
385
let dylib_suffix = & self . target . dll_suffix ;
386
386
let staticlib_suffix = & self . target . staticlib_suffix ;
387
387
388
- let mut candidates: FxHashMap < _ , ( FxHashMap < _ , _ > , FxHashMap < _ , _ > , FxHashMap < _ , _ > ) > =
388
+ let mut candidates: FxIndexMap < _ , ( FxIndexMap < _ , _ > , FxIndexMap < _ , _ > , FxIndexMap < _ , _ > ) > =
389
389
Default :: default ( ) ;
390
390
391
391
// First, find all possible candidate rlibs and dylibs purely based on
@@ -460,7 +460,7 @@ impl<'a> CrateLocator<'a> {
460
460
// A Library candidate is created if the metadata for the set of
461
461
// libraries corresponds to the crate id and hash criteria that this
462
462
// search is being performed for.
463
- let mut libraries = FxHashMap :: default ( ) ;
463
+ let mut libraries = FxIndexMap :: default ( ) ;
464
464
for ( _hash, ( rlibs, rmetas, dylibs) ) in candidates {
465
465
if let Some ( ( svh, lib) ) = self . extract_lib ( rlibs, rmetas, dylibs) ? {
466
466
libraries. insert ( svh, lib) ;
@@ -494,9 +494,9 @@ impl<'a> CrateLocator<'a> {
494
494
495
495
fn extract_lib (
496
496
& 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 > ,
500
500
) -> Result < Option < ( Svh , Library ) > , CrateError > {
501
501
let mut slot = None ;
502
502
// Order here matters, rmeta should come first. See comment in
@@ -534,7 +534,7 @@ impl<'a> CrateLocator<'a> {
534
534
// The `PathBuf` in `slot` will only be used for diagnostic purposes.
535
535
fn extract_one (
536
536
& mut self ,
537
- m : FxHashMap < PathBuf , PathKind > ,
537
+ m : FxIndexMap < PathBuf , PathKind > ,
538
538
flavor : CrateFlavor ,
539
539
slot : & mut Option < ( Svh , MetadataBlob , PathBuf ) > ,
540
540
) -> Result < Option < ( PathBuf , PathKind ) > , CrateError > {
@@ -702,9 +702,9 @@ impl<'a> CrateLocator<'a> {
702
702
// First, filter out all libraries that look suspicious. We only accept
703
703
// files which actually exist that have the correct naming scheme for
704
704
// 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 ( ) ;
708
708
for loc in & self . exact_paths {
709
709
if !loc. canonicalized ( ) . exists ( ) {
710
710
return Err ( CrateError :: ExternLocationNotExist (
0 commit comments