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> {
10461046graph_root : Module < ' ra > ,
10471047
10481048prelude : 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.
10521052field_names : LocalDefIdMap < Vec < Ident > > ,
@@ -1079,7 +1079,7 @@ pub struct Resolver<'ra, 'tcx> {
10791079extra_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 > ,
10831083module_children : LocalDefIdMap < Vec < ModChild > > ,
10841084trait_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.
11041104empty_module : Module < ' ra > ,
1105- module_map : FxHashMap < DefId , Module < ' ra > > ,
1105+ module_map : FxIndexMap < DefId , Module < ' ra > > ,
11061106binding_parent_modules : FxHashMap < NameBinding < ' ra > , Module < ' ra > > ,
11071107
11081108underscore_disambiguator : u32 ,
@@ -1136,7 +1136,7 @@ pub struct Resolver<'ra, 'tcx> {
11361136macro_names : FxHashSet < Ident > ,
11371137builtin_macros : FxHashMap < Symbol , BuiltinMacroState > ,
11381138registered_tools : & ' tcx RegisteredTools ,
1139- macro_use_prelude : FxHashMap < Symbol , NameBinding < ' ra > > ,
1139+ macro_use_prelude : FxIndexMap < Symbol , NameBinding < ' ra > > ,
11401140macro_map : FxHashMap < DefId , MacroData > ,
11411141dummy_ext_bang : Arc < SyntaxExtension > ,
11421142dummy_ext_derive : Arc < SyntaxExtension > ,
@@ -1145,7 +1145,7 @@ pub struct Resolver<'ra, 'tcx> {
11451145ast_transform_scopes : FxHashMap < LocalExpnId , Module < ' ra > > ,
11461146unused_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 ) > > ,
11491149proc_macro_stubs : FxHashSet < LocalDefId > ,
11501150/// Traces collected during macro resolution and validated when it's complete.
11511151single_segment_macro_resolutions :
@@ -1259,7 +1259,7 @@ impl<'ra> ResolverArenas<'ra> {
12591259expn_id : ExpnId ,
12601260span : Span ,
12611261no_implicit_prelude : bool ,
1262- module_map : & mut FxHashMap < DefId , Module < ' ra > > ,
1262+ module_map : & mut FxIndexMap < DefId , Module < ' ra > > ,
12631263module_self_bindings : & mut FxHashMap < Module < ' ra > , NameBinding < ' ra > > ,
12641264) -> Module < ' ra > {
12651265let module = Module ( Interned :: new_unchecked ( self . modules . alloc ( ModuleData :: new (
@@ -1404,7 +1404,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
14041404arenas : & ' ra ResolverArenas < ' ra > ,
14051405) -> Resolver < ' ra , ' tcx > {
14061406let root_def_id = CRATE_DEF_ID . to_def_id ( ) ;
1407- let mut module_map = FxHashMap :: default ( ) ;
1407+ let mut module_map = FxIndexMap :: default ( ) ;
14081408let mut module_self_bindings = FxHashMap :: default ( ) ;
14091409let graph_root = arenas. new_module (
14101410None ,
@@ -1421,8 +1421,8 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
14211421ExpnId :: root ( ) ,
14221422DUMMY_SP ,
14231423true ,
1424- & mut FxHashMap :: default ( ) ,
1425- & mut FxHashMap :: default ( ) ,
1424+ & mut Default :: default ( ) ,
1425+ & mut Default :: default ( ) ,
14261426) ;
14271427
14281428let mut def_id_to_node_id = IndexVec :: default ( ) ;
@@ -1437,7 +1437,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
14371437let 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> {
15361536macro_names : FxHashSet :: default ( ) ,
15371537builtin_macros : Default :: default ( ) ,
15381538 registered_tools,
1539- macro_use_prelude : FxHashMap :: default ( ) ,
1539+ macro_use_prelude : Default :: default ( ) ,
15401540macro_map : FxHashMap :: default ( ) ,
15411541dummy_ext_bang : Arc :: new ( SyntaxExtension :: dummy_bang ( edition) ) ,
15421542dummy_ext_derive : Arc :: new ( SyntaxExtension :: dummy_derive ( edition) ) ,
0 commit comments