@@ -6,7 +6,6 @@ use super::{FnDeclKind, LoweringContext, ParamMode};
6
6
use rustc_ast:: ptr:: P ;
7
7
use rustc_ast:: visit:: AssocCtxt ;
8
8
use rustc_ast:: * ;
9
- use rustc_data_structures:: fx:: FxHashMap ;
10
9
use rustc_data_structures:: sorted_map:: SortedMap ;
11
10
use rustc_hir as hir;
12
11
use rustc_hir:: def:: { DefKind , Res } ;
@@ -67,7 +66,7 @@ impl<'a, 'hir> ItemLowerer<'a, 'hir> {
67
66
// HirId handling.
68
67
bodies : Vec :: new ( ) ,
69
68
attrs : SortedMap :: default ( ) ,
70
- children : FxHashMap :: default ( ) ,
69
+ children : Vec :: default ( ) ,
71
70
current_hir_id_owner : hir:: CRATE_OWNER_ID ,
72
71
item_local_id_counter : hir:: ItemLocalId :: new ( 0 ) ,
73
72
node_id_to_local_id : Default :: default ( ) ,
@@ -86,7 +85,7 @@ impl<'a, 'hir> ItemLowerer<'a, 'hir> {
86
85
impl_trait_defs : Vec :: new ( ) ,
87
86
impl_trait_bounds : Vec :: new ( ) ,
88
87
allow_try_trait : Some ( [ sym:: try_trait_v2, sym:: yeet_desugar_details] [ ..] . into ( ) ) ,
89
- allow_gen_future : Some ( [ sym:: gen_future] [ ..] . into ( ) ) ,
88
+ allow_gen_future : Some ( [ sym:: gen_future, sym :: closure_track_caller ] [ ..] . into ( ) ) ,
90
89
allow_into_future : Some ( [ sym:: into_future] [ ..] . into ( ) ) ,
91
90
generics_def_id_map : Default :: default ( ) ,
92
91
} ;
@@ -534,12 +533,12 @@ impl<'hir> LoweringContext<'_, 'hir> {
534
533
for new_node_id in [ id1, id2] {
535
534
let new_id = self . local_def_id ( new_node_id) ;
536
535
let Some ( res) = resolutions. next ( ) else {
536
+ debug_assert ! ( self . children. iter( ) . find( |( id, _) | id == & new_id) . is_none( ) ) ;
537
537
// Associate an HirId to both ids even if there is no resolution.
538
- let _old = self . children . insert (
538
+ self . children . push ( (
539
539
new_id,
540
- hir:: MaybeOwner :: NonOwner ( hir:: HirId :: make_owner ( new_id) ) ,
540
+ hir:: MaybeOwner :: NonOwner ( hir:: HirId :: make_owner ( new_id) ) ) ,
541
541
) ;
542
- debug_assert ! ( _old. is_none( ) ) ;
543
542
continue ;
544
543
} ;
545
544
let ident = * ident;
0 commit comments