@@ -48,6 +48,7 @@ use rustc_data_structures::fingerprint::Fingerprint;
4848use rustc_data_structures:: sorted_map:: SortedMap ;
4949use rustc_data_structures:: stable_hasher:: { HashStable , StableHasher } ;
5050use rustc_data_structures:: sync:: Lrc ;
51+ use rustc_data_structures:: tagged_ptr:: TaggedRef ;
5152use rustc_errors:: { DiagArgFromDisplay , DiagCtxtHandle , StashKey } ;
5253use rustc_hir:: def:: { DefKind , LifetimeRes , Namespace , PartialRes , PerNS , Res } ;
5354use rustc_hir:: def_id:: { CRATE_DEF_ID , LOCAL_CRATE , LocalDefId } ;
@@ -1158,7 +1159,10 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
11581159 let lifetime_bound = this. elided_dyn_bound ( t. span ) ;
11591160 ( bounds, lifetime_bound)
11601161 } ) ;
1161- let kind = hir:: TyKind :: TraitObject ( bounds, lifetime_bound, TraitObjectSyntax :: None ) ;
1162+ let kind = hir:: TyKind :: TraitObject (
1163+ bounds,
1164+ TaggedRef :: new ( lifetime_bound, TraitObjectSyntax :: None ) ,
1165+ ) ;
11621166 return hir:: Ty { kind, span : self . lower_span ( t. span ) , hir_id : self . next_id ( ) } ;
11631167 }
11641168
@@ -1309,7 +1313,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
13091313 lifetime_bound. unwrap_or_else ( || this. elided_dyn_bound ( t. span ) ) ;
13101314 ( bounds, lifetime_bound)
13111315 } ) ;
1312- hir:: TyKind :: TraitObject ( bounds, lifetime_bound, * kind)
1316+ hir:: TyKind :: TraitObject ( bounds, TaggedRef :: new ( lifetime_bound, * kind) )
13131317 }
13141318 TyKind :: ImplTrait ( def_node_id, bounds) => {
13151319 let span = t. span ;
@@ -2365,8 +2369,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
23652369 hir_id = self . next_id ( ) ;
23662370 hir:: TyKind :: TraitObject (
23672371 arena_vec ! [ self ; principal] ,
2368- self . elided_dyn_bound ( span) ,
2369- TraitObjectSyntax :: None ,
2372+ TaggedRef :: new ( self . elided_dyn_bound ( span) , TraitObjectSyntax :: None ) ,
23702373 )
23712374 }
23722375 _ => hir:: TyKind :: Path ( hir:: QPath :: Resolved ( None , path) ) ,
0 commit comments