@@ -128,11 +128,10 @@ pub fn specialized_encode_alloc_id<'tcx, E: TyEncoder<'tcx>>(
128128 ty. encode ( encoder) ;
129129 poly_trait_ref. encode ( encoder) ;
130130 }
131- GlobalAlloc :: Type { ty, segment } => {
131+ GlobalAlloc :: Type { ty } => {
132132 trace ! ( "encoding {alloc_id:?} with {ty:#?}" ) ;
133133 AllocDiscriminant :: Type . encode ( encoder) ;
134134 ty. encode ( encoder) ;
135- segment. encode ( encoder) ;
136135 }
137136 GlobalAlloc :: Static ( did) => {
138137 assert ! ( !tcx. is_thread_local_static( did) ) ;
@@ -238,9 +237,8 @@ impl<'s> AllocDecodingSession<'s> {
238237 AllocDiscriminant :: Type => {
239238 trace ! ( "creating typeid alloc ID" ) ;
240239 let ty = Decodable :: decode ( decoder) ;
241- let segment = Decodable :: decode ( decoder) ;
242- trace ! ( "decoded typid: {ty:?} ({segment})" ) ;
243- decoder. interner ( ) . reserve_and_set_type_id_alloc ( ty, segment)
240+ trace ! ( "decoded typid: {ty:?}" ) ;
241+ decoder. interner ( ) . reserve_and_set_type_id_alloc ( ty)
244242 }
245243 AllocDiscriminant :: Static => {
246244 trace ! ( "creating extern static alloc ID" ) ;
@@ -272,9 +270,9 @@ pub enum GlobalAlloc<'tcx> {
272270 Static ( DefId ) ,
273271 /// The alloc ID points to memory.
274272 Memory ( ConstAllocation < ' tcx > ) ,
275- /// A pointer-sized segment of a type id. On 64 bit systems, the 128 bit type id
273+ /// The first pointer-sized segment of a type id. On 64 bit systems, the 128 bit type id
276274 /// is split into two segments, on 32 bit systems there are 4 segments, and so on.
277- Type { ty : Ty < ' tcx > , segment : u8 } ,
275+ Type { ty : Ty < ' tcx > } ,
278276}
279277
280278impl < ' tcx > GlobalAlloc < ' tcx > {
@@ -508,8 +506,8 @@ impl<'tcx> TyCtxt<'tcx> {
508506 }
509507
510508 /// Generates an [AllocId] for a [core::mem::type_info::TypeId]. Will get deduplicated.
511- pub fn reserve_and_set_type_id_alloc ( self , ty : Ty < ' tcx > , segment : u8 ) -> AllocId {
512- self . reserve_and_set_dedup ( GlobalAlloc :: Type { ty, segment } , 0 )
509+ pub fn reserve_and_set_type_id_alloc ( self , ty : Ty < ' tcx > ) -> AllocId {
510+ self . reserve_and_set_dedup ( GlobalAlloc :: Type { ty } , 0 )
513511 }
514512
515513 /// Interns the `Allocation` and return a new `AllocId`, even if there's already an identical
0 commit comments