@@ -2054,7 +2054,7 @@ impl<'tcx, T: HasTyCtxt<'tcx>> HasTyCtxt<'tcx> for LayoutCx<'tcx, T> {
2054
2054
2055
2055
pub type TyAndLayout < ' tcx > = rustc_target:: abi:: TyAndLayout < ' tcx , Ty < ' tcx > > ;
2056
2056
2057
- impl < ' tcx > LayoutOf for LayoutCx < ' tcx , TyCtxt < ' tcx > > {
2057
+ impl LayoutOf < ' tcx > for LayoutCx < ' tcx , TyCtxt < ' tcx > > {
2058
2058
type Ty = Ty < ' tcx > ;
2059
2059
type TyAndLayout = Result < TyAndLayout < ' tcx > , LayoutError < ' tcx > > ;
2060
2060
@@ -2066,7 +2066,7 @@ impl<'tcx> LayoutOf for LayoutCx<'tcx, TyCtxt<'tcx>> {
2066
2066
}
2067
2067
}
2068
2068
2069
- impl LayoutOf for LayoutCx < ' tcx , ty:: query:: TyCtxtAt < ' tcx > > {
2069
+ impl LayoutOf < ' tcx > for LayoutCx < ' tcx , ty:: query:: TyCtxtAt < ' tcx > > {
2070
2070
type Ty = Ty < ' tcx > ;
2071
2071
type TyAndLayout = Result < TyAndLayout < ' tcx > , LayoutError < ' tcx > > ;
2072
2072
@@ -2080,9 +2080,7 @@ impl LayoutOf for LayoutCx<'tcx, ty::query::TyCtxtAt<'tcx>> {
2080
2080
2081
2081
impl < ' tcx , C > TyAndLayoutMethods < ' tcx , C > for Ty < ' tcx >
2082
2082
where
2083
- C : LayoutOf < Ty = Ty < ' tcx > , TyAndLayout : MaybeResult < TyAndLayout < ' tcx > > >
2084
- + HasTyCtxt < ' tcx >
2085
- + HasParamEnv < ' tcx > ,
2083
+ C : LayoutOf < ' tcx , Ty = Ty < ' tcx > > + HasTyCtxt < ' tcx > + HasParamEnv < ' tcx > ,
2086
2084
{
2087
2085
fn for_variant (
2088
2086
this : TyAndLayout < ' tcx > ,
@@ -2135,21 +2133,19 @@ where
2135
2133
}
2136
2134
2137
2135
fn field ( this : TyAndLayout < ' tcx > , cx : & C , i : usize ) -> C :: TyAndLayout {
2138
- enum TyMaybeWithLayout < C : LayoutOf > {
2136
+ enum TyMaybeWithLayout < ' tcx , C : LayoutOf < ' tcx > > {
2139
2137
Ty ( C :: Ty ) ,
2140
2138
TyAndLayout ( C :: TyAndLayout ) ,
2141
2139
}
2142
2140
2143
2141
fn ty_and_layout_kind <
2144
- C : LayoutOf < Ty = Ty < ' tcx > , TyAndLayout : MaybeResult < TyAndLayout < ' tcx > > >
2145
- + HasTyCtxt < ' tcx >
2146
- + HasParamEnv < ' tcx > ,
2142
+ C : LayoutOf < ' tcx , Ty = Ty < ' tcx > > + HasTyCtxt < ' tcx > + HasParamEnv < ' tcx > ,
2147
2143
> (
2148
2144
this : TyAndLayout < ' tcx > ,
2149
2145
cx : & C ,
2150
2146
i : usize ,
2151
2147
ty : C :: Ty ,
2152
- ) -> TyMaybeWithLayout < C > {
2148
+ ) -> TyMaybeWithLayout < ' tcx , C > {
2153
2149
let tcx = cx. tcx ( ) ;
2154
2150
let tag_layout = |tag : & Scalar | -> C :: TyAndLayout {
2155
2151
let layout = Layout :: scalar ( cx, tag. clone ( ) ) ;
@@ -2538,7 +2534,7 @@ impl<'tcx> ty::Instance<'tcx> {
2538
2534
2539
2535
pub trait FnAbiExt < ' tcx , C >
2540
2536
where
2541
- C : LayoutOf < Ty = Ty < ' tcx > , TyAndLayout = TyAndLayout < ' tcx > >
2537
+ C : LayoutOf < ' tcx , Ty = Ty < ' tcx > , TyAndLayout = TyAndLayout < ' tcx > >
2542
2538
+ HasDataLayout
2543
2539
+ HasTargetSpec
2544
2540
+ HasTyCtxt < ' tcx >
@@ -2725,7 +2721,7 @@ pub fn conv_from_spec_abi(tcx: TyCtxt<'_>, abi: SpecAbi) -> Conv {
2725
2721
2726
2722
impl < ' tcx , C > FnAbiExt < ' tcx , C > for call:: FnAbi < ' tcx , Ty < ' tcx > >
2727
2723
where
2728
- C : LayoutOf < Ty = Ty < ' tcx > , TyAndLayout = TyAndLayout < ' tcx > >
2724
+ C : LayoutOf < ' tcx , Ty = Ty < ' tcx > , TyAndLayout = TyAndLayout < ' tcx > >
2729
2725
+ HasDataLayout
2730
2726
+ HasTargetSpec
2731
2727
+ HasTyCtxt < ' tcx >
@@ -3006,7 +3002,7 @@ where
3006
3002
3007
3003
fn make_thin_self_ptr < ' tcx , C > ( cx : & C , mut layout : TyAndLayout < ' tcx > ) -> TyAndLayout < ' tcx >
3008
3004
where
3009
- C : LayoutOf < Ty = Ty < ' tcx > , TyAndLayout = TyAndLayout < ' tcx > >
3005
+ C : LayoutOf < ' tcx , Ty = Ty < ' tcx > , TyAndLayout = TyAndLayout < ' tcx > >
3010
3006
+ HasTyCtxt < ' tcx >
3011
3007
+ HasParamEnv < ' tcx > ,
3012
3008
{
0 commit comments