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