@@ -2752,7 +2752,7 @@ pub struct OpaqueTy<'hir> {
2752
2752
pub def_id : LocalDefId ,
2753
2753
pub generics : & ' hir Generics < ' hir > ,
2754
2754
pub bounds : GenericBounds < ' hir > ,
2755
- pub origin : OpaqueTyOrigin ,
2755
+ pub origin : OpaqueTyOrigin < LocalDefId > ,
2756
2756
/// Return-position impl traits (and async futures) must "reify" any late-bound
2757
2757
/// lifetimes that are captured from the function signature they originate from.
2758
2758
///
@@ -2800,33 +2800,35 @@ pub struct PreciseCapturingNonLifetimeArg {
2800
2800
pub res : Res ,
2801
2801
}
2802
2802
2803
- #[ derive( Copy , Clone , PartialEq , Eq , Debug , HashStable_Generic ) ]
2803
+ #[ derive( Copy , Clone , PartialEq , Eq , Debug ) ]
2804
+ #[ derive( HashStable_Generic , Encodable , Decodable ) ]
2804
2805
pub enum RpitContext {
2805
2806
Trait ,
2806
2807
TraitImpl ,
2807
2808
}
2808
2809
2809
2810
/// From whence the opaque type came.
2810
- #[ derive( Copy , Clone , PartialEq , Eq , Debug , HashStable_Generic ) ]
2811
- pub enum OpaqueTyOrigin {
2811
+ #[ derive( Copy , Clone , PartialEq , Eq , Debug ) ]
2812
+ #[ derive( HashStable_Generic , Encodable , Decodable ) ]
2813
+ pub enum OpaqueTyOrigin < D > {
2812
2814
/// `-> impl Trait`
2813
2815
FnReturn {
2814
2816
/// The defining function.
2815
- parent : LocalDefId ,
2817
+ parent : D ,
2816
2818
// Whether this is an RPITIT (return position impl trait in trait)
2817
2819
in_trait_or_impl : Option < RpitContext > ,
2818
2820
} ,
2819
2821
/// `async fn`
2820
2822
AsyncFn {
2821
2823
/// The defining function.
2822
- parent : LocalDefId ,
2824
+ parent : D ,
2823
2825
// Whether this is an AFIT (async fn in trait)
2824
2826
in_trait_or_impl : Option < RpitContext > ,
2825
2827
} ,
2826
2828
/// type aliases: `type Foo = impl Trait;`
2827
2829
TyAlias {
2828
2830
/// The type alias or associated type parent of the TAIT/ATPIT
2829
- parent : LocalDefId ,
2831
+ parent : D ,
2830
2832
/// associated types in impl blocks for traits.
2831
2833
in_assoc_ty : bool ,
2832
2834
} ,
0 commit comments