@@ -6,7 +6,6 @@ use super::{FnDeclKind, LoweringContext, ParamMode};
66use rustc_ast:: ptr:: P ;
77use rustc_ast:: visit:: AssocCtxt ;
88use rustc_ast:: * ;
9- use rustc_data_structures:: fx:: FxHashMap ;
109use rustc_data_structures:: sorted_map:: SortedMap ;
1110use rustc_hir as hir;
1211use rustc_hir:: def:: { DefKind , Res } ;
@@ -67,7 +66,7 @@ impl<'a, 'hir> ItemLowerer<'a, 'hir> {
6766 // HirId handling.
6867 bodies : Vec :: new ( ) ,
6968 attrs : SortedMap :: default ( ) ,
70- children : FxHashMap :: default ( ) ,
69+ children : Vec :: default ( ) ,
7170 current_hir_id_owner : hir:: CRATE_OWNER_ID ,
7271 item_local_id_counter : hir:: ItemLocalId :: new ( 0 ) ,
7372 node_id_to_local_id : Default :: default ( ) ,
@@ -86,7 +85,7 @@ impl<'a, 'hir> ItemLowerer<'a, 'hir> {
8685 impl_trait_defs : Vec :: new ( ) ,
8786 impl_trait_bounds : Vec :: new ( ) ,
8887 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 ( ) ) ,
9089 allow_into_future : Some ( [ sym:: into_future] [ ..] . into ( ) ) ,
9190 generics_def_id_map : Default :: default ( ) ,
9291 } ;
@@ -534,12 +533,12 @@ impl<'hir> LoweringContext<'_, 'hir> {
534533 for new_node_id in [ id1, id2] {
535534 let new_id = self . local_def_id ( new_node_id) ;
536535 let Some ( res) = resolutions. next ( ) else {
536+ debug_assert ! ( self . children. iter( ) . find( |( id, _) | id == & new_id) . is_none( ) ) ;
537537 // Associate an HirId to both ids even if there is no resolution.
538- let _old = self . children . insert (
538+ self . children . push ( (
539539 new_id,
540- hir:: MaybeOwner :: NonOwner ( hir:: HirId :: make_owner ( new_id) ) ,
540+ hir:: MaybeOwner :: NonOwner ( hir:: HirId :: make_owner ( new_id) ) ) ,
541541 ) ;
542- debug_assert ! ( _old. is_none( ) ) ;
543542 continue ;
544543 } ;
545544 let ident = * ident;
0 commit comments