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