@@ -2746,7 +2746,7 @@ pub struct OpaqueTy<'hir> {
2746
2746
pub hir_id : HirId ,
2747
2747
pub def_id : LocalDefId ,
2748
2748
pub bounds : GenericBounds < ' hir > ,
2749
- pub origin : OpaqueTyOrigin ,
2749
+ pub origin : OpaqueTyOrigin < LocalDefId > ,
2750
2750
pub span : Span ,
2751
2751
}
2752
2752
@@ -2784,33 +2784,35 @@ pub struct PreciseCapturingNonLifetimeArg {
2784
2784
pub res : Res ,
2785
2785
}
2786
2786
2787
- #[ derive( Copy , Clone , PartialEq , Eq , Debug , HashStable_Generic ) ]
2787
+ #[ derive( Copy , Clone , PartialEq , Eq , Debug ) ]
2788
+ #[ derive( HashStable_Generic , Encodable , Decodable ) ]
2788
2789
pub enum RpitContext {
2789
2790
Trait ,
2790
2791
TraitImpl ,
2791
2792
}
2792
2793
2793
2794
/// 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 > {
2796
2798
/// `-> impl Trait`
2797
2799
FnReturn {
2798
2800
/// The defining function.
2799
- parent : LocalDefId ,
2801
+ parent : D ,
2800
2802
// Whether this is an RPITIT (return position impl trait in trait)
2801
2803
in_trait_or_impl : Option < RpitContext > ,
2802
2804
} ,
2803
2805
/// `async fn`
2804
2806
AsyncFn {
2805
2807
/// The defining function.
2806
- parent : LocalDefId ,
2808
+ parent : D ,
2807
2809
// Whether this is an AFIT (async fn in trait)
2808
2810
in_trait_or_impl : Option < RpitContext > ,
2809
2811
} ,
2810
2812
/// type aliases: `type Foo = impl Trait;`
2811
2813
TyAlias {
2812
2814
/// The type alias or associated type parent of the TAIT/ATPIT
2813
- parent : LocalDefId ,
2815
+ parent : D ,
2814
2816
/// associated types in impl blocks for traits.
2815
2817
in_assoc_ty : bool ,
2816
2818
} ,
0 commit comments