@@ -94,22 +94,22 @@ pub struct ExistentialProjection {
9494#[ args( <S >, from: ty:: DynKind , state: S as _s) ]
9595pub enum DynKind {
9696 Dyn ,
97- DynStar ,
9897}
9998
10099/// Reflects [`ty::BoundTyKind`]
101100#[ derive_group( Serializers ) ]
102101#[ derive( AdtInto , Clone , Debug , JsonSchema , Hash , PartialEq , Eq , PartialOrd , Ord ) ]
103- #[ args( <' tcx, S : UnderOwnerState <' tcx>>, from: ty:: BoundTyKind , state: S as gstate ) ]
102+ #[ args( <' tcx, S : UnderOwnerState <' tcx>>, from: ty:: BoundTyKind , state: S as s ) ]
104103pub enum BoundTyKind {
105104 Anon ,
105+ #[ custom_arm( & FROM_TYPE :: Param ( def_id) => TO_TYPE :: Param ( def_id. sinto( s) , s. base( ) . tcx. item_name( def_id) . sinto( s) ) , ) ]
106106 Param ( DefId , Symbol ) ,
107107}
108108
109109/// Reflects [`ty::BoundTy`]
110110#[ derive_group( Serializers ) ]
111111#[ derive( AdtInto , Clone , Debug , JsonSchema , Hash , PartialEq , Eq , PartialOrd , Ord ) ]
112- #[ args( <' tcx, S : UnderOwnerState <' tcx>>, from: ty:: BoundTy , state: S as gstate ) ]
112+ #[ args( <' tcx, S : UnderOwnerState <' tcx>>, from: ty:: BoundTy , state: S as s ) ]
113113pub struct BoundTy {
114114 pub var : BoundVar ,
115115 pub kind : BoundTyKind ,
@@ -120,17 +120,19 @@ sinto_as_usize!(rustc_middle::ty, BoundVar);
120120/// Reflects [`ty::BoundRegionKind`]
121121#[ derive_group( Serializers ) ]
122122#[ derive( AdtInto , Clone , Debug , JsonSchema , Hash , PartialEq , Eq , PartialOrd , Ord ) ]
123- #[ args( <' tcx, S : UnderOwnerState <' tcx>>, from: ty:: BoundRegionKind , state: S as gstate ) ]
123+ #[ args( <' tcx, S : UnderOwnerState <' tcx>>, from: ty:: BoundRegionKind , state: S as s ) ]
124124pub enum BoundRegionKind {
125125 Anon ,
126+ NamedAnon ( Symbol ) ,
127+ #[ custom_arm( & FROM_TYPE :: Named ( def_id) => TO_TYPE :: Named ( def_id. sinto( s) , s. base( ) . tcx. item_name( def_id) . sinto( s) ) , ) ]
126128 Named ( DefId , Symbol ) ,
127129 ClosureEnv ,
128130}
129131
130132/// Reflects [`ty::BoundRegion`]
131133#[ derive_group( Serializers ) ]
132134#[ derive( AdtInto , Clone , Debug , JsonSchema , Hash , PartialEq , Eq , PartialOrd , Ord ) ]
133- #[ args( <' tcx, S : UnderOwnerState <' tcx>>, from: ty:: BoundRegion , state: S as gstate ) ]
135+ #[ args( <' tcx, S : UnderOwnerState <' tcx>>, from: ty:: BoundRegion , state: S as s ) ]
134136pub struct BoundRegion {
135137 pub var : BoundVar ,
136138 pub kind : BoundRegionKind ,
@@ -370,7 +372,7 @@ impl VariantDef {
370372/// Reflects [`ty::EarlyParamRegion`]
371373#[ derive_group( Serializers ) ]
372374#[ derive( AdtInto , Clone , Debug , JsonSchema , Hash , PartialEq , Eq , PartialOrd , Ord ) ]
373- #[ args( <' tcx, S : UnderOwnerState <' tcx>>, from: ty:: EarlyParamRegion , state: S as gstate ) ]
375+ #[ args( <' tcx, S : UnderOwnerState <' tcx>>, from: ty:: EarlyParamRegion , state: S as s ) ]
374376pub struct EarlyParamRegion {
375377 pub index : u32 ,
376378 pub name : Symbol ,
@@ -379,7 +381,7 @@ pub struct EarlyParamRegion {
379381/// Reflects [`ty::LateParamRegion`]
380382#[ derive_group( Serializers ) ]
381383#[ derive( AdtInto , Clone , Debug , JsonSchema , Hash , PartialEq , Eq , PartialOrd , Ord ) ]
382- #[ args( <' tcx, S : UnderOwnerState <' tcx>>, from: ty:: LateParamRegion , state: S as gstate ) ]
384+ #[ args( <' tcx, S : UnderOwnerState <' tcx>>, from: ty:: LateParamRegion , state: S as s ) ]
383385pub struct LateParamRegion {
384386 pub scope : DefId ,
385387 pub kind : LateParamRegionKind ,
@@ -388,9 +390,11 @@ pub struct LateParamRegion {
388390/// Reflects [`ty::LateParamRegionKind`]
389391#[ derive_group( Serializers ) ]
390392#[ derive( AdtInto , Clone , Debug , JsonSchema , Hash , PartialEq , Eq , PartialOrd , Ord ) ]
391- #[ args( <' tcx, S : UnderOwnerState <' tcx>>, from: ty:: LateParamRegionKind , state: S as gstate ) ]
393+ #[ args( <' tcx, S : UnderOwnerState <' tcx>>, from: ty:: LateParamRegionKind , state: S as s ) ]
392394pub enum LateParamRegionKind {
393395 Anon ( u32 ) ,
396+ NamedAnon ( u32 , Symbol ) ,
397+ #[ custom_arm( & FROM_TYPE :: Named ( def_id) => TO_TYPE :: Named ( def_id. sinto( s) , s. base( ) . tcx. item_name( def_id) . sinto( s) ) , ) ]
394398 Named ( DefId , Symbol ) ,
395399 ClosureEnv ,
396400}
@@ -1078,7 +1082,6 @@ pub enum PointerCoercion {
10781082 ClosureFnPointer ( Safety ) ,
10791083 MutToConstPointer ,
10801084 ArrayToPointer ,
1081- DynStar ,
10821085 Unsize ,
10831086}
10841087
0 commit comments