99// tidy-alphabetical-start
1010#![ allow( internal_features) ]
1111#![ allow( rustc:: diagnostic_outside_of_impl) ]
12- #![ allow( rustc:: potential_query_instability) ]
1312#![ allow( rustc:: untranslatable_diagnostic) ]
1413#![ doc( html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/" ) ]
1514#![ doc( rust_logo) ]
@@ -47,6 +46,7 @@ use rustc_data_structures::fx::{FxHashMap, FxHashSet, FxIndexMap, FxIndexSet};
4746use rustc_data_structures:: intern:: Interned ;
4847use rustc_data_structures:: steal:: Steal ;
4948use rustc_data_structures:: sync:: FreezeReadGuard ;
49+ use rustc_data_structures:: unord:: UnordMap ;
5050use rustc_errors:: { Applicability , Diag , ErrCode , ErrorGuaranteed } ;
5151use rustc_expand:: base:: { DeriveResolution , SyntaxExtension , SyntaxExtensionKind } ;
5252use rustc_feature:: BUILTIN_ATTRIBUTES ;
@@ -1046,7 +1046,7 @@ pub struct Resolver<'ra, 'tcx> {
10461046 graph_root : Module < ' ra > ,
10471047
10481048 prelude : Option < Module < ' ra > > ,
1049- extern_prelude : FxHashMap < Ident , ExternPreludeEntry < ' ra > > ,
1049+ extern_prelude : FxIndexMap < Ident , ExternPreludeEntry < ' ra > > ,
10501050
10511051 /// N.B., this is used only for better diagnostics, not name resolution itself.
10521052 field_names : LocalDefIdMap < Vec < Ident > > ,
@@ -1079,7 +1079,7 @@ pub struct Resolver<'ra, 'tcx> {
10791079 extra_lifetime_params_map : NodeMap < Vec < ( Ident , NodeId , LifetimeRes ) > > ,
10801080
10811081 /// `CrateNum` resolutions of `extern crate` items.
1082- extern_crate_map : FxHashMap < LocalDefId , CrateNum > ,
1082+ extern_crate_map : UnordMap < LocalDefId , CrateNum > ,
10831083 module_children : LocalDefIdMap < Vec < ModChild > > ,
10841084 trait_map : NodeMap < Vec < TraitCandidate > > ,
10851085
@@ -1102,7 +1102,7 @@ pub struct Resolver<'ra, 'tcx> {
11021102 /// some AST passes can generate identifiers that only resolve to local or
11031103 /// lang items.
11041104 empty_module : Module < ' ra > ,
1105- module_map : FxHashMap < DefId , Module < ' ra > > ,
1105+ module_map : FxIndexMap < DefId , Module < ' ra > > ,
11061106 binding_parent_modules : FxHashMap < NameBinding < ' ra > , Module < ' ra > > ,
11071107
11081108 underscore_disambiguator : u32 ,
@@ -1136,7 +1136,7 @@ pub struct Resolver<'ra, 'tcx> {
11361136 macro_names : FxHashSet < Ident > ,
11371137 builtin_macros : FxHashMap < Symbol , BuiltinMacroState > ,
11381138 registered_tools : & ' tcx RegisteredTools ,
1139- macro_use_prelude : FxHashMap < Symbol , NameBinding < ' ra > > ,
1139+ macro_use_prelude : FxIndexMap < Symbol , NameBinding < ' ra > > ,
11401140 macro_map : FxHashMap < DefId , MacroData > ,
11411141 dummy_ext_bang : Arc < SyntaxExtension > ,
11421142 dummy_ext_derive : Arc < SyntaxExtension > ,
@@ -1145,7 +1145,7 @@ pub struct Resolver<'ra, 'tcx> {
11451145 ast_transform_scopes : FxHashMap < LocalExpnId , Module < ' ra > > ,
11461146 unused_macros : FxHashMap < LocalDefId , ( NodeId , Ident ) > ,
11471147 /// A map from the macro to all its potentially unused arms.
1148- unused_macro_rules : FxIndexMap < LocalDefId , FxHashMap < usize , ( Ident , Span ) > > ,
1148+ unused_macro_rules : FxIndexMap < LocalDefId , UnordMap < usize , ( Ident , Span ) > > ,
11491149 proc_macro_stubs : FxHashSet < LocalDefId > ,
11501150 /// Traces collected during macro resolution and validated when it's complete.
11511151 single_segment_macro_resolutions :
@@ -1259,7 +1259,7 @@ impl<'ra> ResolverArenas<'ra> {
12591259 expn_id : ExpnId ,
12601260 span : Span ,
12611261 no_implicit_prelude : bool ,
1262- module_map : & mut FxHashMap < DefId , Module < ' ra > > ,
1262+ module_map : & mut FxIndexMap < DefId , Module < ' ra > > ,
12631263 module_self_bindings : & mut FxHashMap < Module < ' ra > , NameBinding < ' ra > > ,
12641264 ) -> Module < ' ra > {
12651265 let module = Module ( Interned :: new_unchecked ( self . modules . alloc ( ModuleData :: new (
@@ -1404,7 +1404,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
14041404 arenas : & ' ra ResolverArenas < ' ra > ,
14051405 ) -> Resolver < ' ra , ' tcx > {
14061406 let root_def_id = CRATE_DEF_ID . to_def_id ( ) ;
1407- let mut module_map = FxHashMap :: default ( ) ;
1407+ let mut module_map = FxIndexMap :: default ( ) ;
14081408 let mut module_self_bindings = FxHashMap :: default ( ) ;
14091409 let graph_root = arenas. new_module (
14101410 None ,
@@ -1421,8 +1421,8 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
14211421 ExpnId :: root ( ) ,
14221422 DUMMY_SP ,
14231423 true ,
1424- & mut FxHashMap :: default ( ) ,
1425- & mut FxHashMap :: default ( ) ,
1424+ & mut Default :: default ( ) ,
1425+ & mut Default :: default ( ) ,
14261426 ) ;
14271427
14281428 let mut def_id_to_node_id = IndexVec :: default ( ) ;
@@ -1437,7 +1437,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
14371437 let mut invocation_parents = FxHashMap :: default ( ) ;
14381438 invocation_parents. insert ( LocalExpnId :: ROOT , InvocationParent :: ROOT ) ;
14391439
1440- let mut extern_prelude: FxHashMap < Ident , ExternPreludeEntry < ' _ > > = tcx
1440+ let mut extern_prelude: FxIndexMap < Ident , ExternPreludeEntry < ' _ > > = tcx
14411441 . sess
14421442 . opts
14431443 . externs
@@ -1536,7 +1536,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
15361536 macro_names : FxHashSet :: default ( ) ,
15371537 builtin_macros : Default :: default ( ) ,
15381538 registered_tools,
1539- macro_use_prelude : FxHashMap :: default ( ) ,
1539+ macro_use_prelude : Default :: default ( ) ,
15401540 macro_map : FxHashMap :: default ( ) ,
15411541 dummy_ext_bang : Arc :: new ( SyntaxExtension :: dummy_bang ( edition) ) ,
15421542 dummy_ext_derive : Arc :: new ( SyntaxExtension :: dummy_derive ( edition) ) ,
0 commit comments