@@ -2746,7 +2746,7 @@ pub struct OpaqueTy<'hir> {
27462746 pub hir_id : HirId ,
27472747 pub def_id : LocalDefId ,
27482748 pub bounds : GenericBounds < ' hir > ,
2749- pub origin : OpaqueTyOrigin ,
2749+ pub origin : OpaqueTyOrigin < LocalDefId > ,
27502750 pub span : Span ,
27512751}
27522752
@@ -2784,33 +2784,35 @@ pub struct PreciseCapturingNonLifetimeArg {
27842784 pub res : Res ,
27852785}
27862786
2787- #[ derive( Copy , Clone , PartialEq , Eq , Debug , HashStable_Generic ) ]
2787+ #[ derive( Copy , Clone , PartialEq , Eq , Debug ) ]
2788+ #[ derive( HashStable_Generic , Encodable , Decodable ) ]
27882789pub enum RpitContext {
27892790 Trait ,
27902791 TraitImpl ,
27912792}
27922793
27932794/// From whence the opaque type came.
2794- #[ derive( Copy , Clone , PartialEq , Eq , Debug , HashStable_Generic ) ]
2795- pub enum OpaqueTyOrigin {
2795+ #[ derive( Copy , Clone , PartialEq , Eq , Debug ) ]
2796+ #[ derive( HashStable_Generic , Encodable , Decodable ) ]
2797+ pub enum OpaqueTyOrigin < D > {
27962798 /// `-> impl Trait`
27972799 FnReturn {
27982800 /// The defining function.
2799- parent : LocalDefId ,
2801+ parent : D ,
28002802 // Whether this is an RPITIT (return position impl trait in trait)
28012803 in_trait_or_impl : Option < RpitContext > ,
28022804 } ,
28032805 /// `async fn`
28042806 AsyncFn {
28052807 /// The defining function.
2806- parent : LocalDefId ,
2808+ parent : D ,
28072809 // Whether this is an AFIT (async fn in trait)
28082810 in_trait_or_impl : Option < RpitContext > ,
28092811 } ,
28102812 /// type aliases: `type Foo = impl Trait;`
28112813 TyAlias {
28122814 /// The type alias or associated type parent of the TAIT/ATPIT
2813- parent : LocalDefId ,
2815+ parent : D ,
28142816 /// associated types in impl blocks for traits.
28152817 in_assoc_ty : bool ,
28162818 } ,
0 commit comments