@@ -2054,7 +2054,7 @@ impl<'tcx, T: HasTyCtxt<'tcx>> HasTyCtxt<'tcx> for LayoutCx<'tcx, T> {
20542054
20552055pub type TyAndLayout < ' tcx > = rustc_target:: abi:: TyAndLayout < ' tcx , Ty < ' tcx > > ;
20562056
2057- impl < ' tcx > LayoutOf for LayoutCx < ' tcx , TyCtxt < ' tcx > > {
2057+ impl LayoutOf < ' tcx > for LayoutCx < ' tcx , TyCtxt < ' tcx > > {
20582058 type Ty = Ty < ' tcx > ;
20592059 type TyAndLayout = Result < TyAndLayout < ' tcx > , LayoutError < ' tcx > > ;
20602060
@@ -2066,7 +2066,7 @@ impl<'tcx> LayoutOf for LayoutCx<'tcx, TyCtxt<'tcx>> {
20662066 }
20672067}
20682068
2069- impl LayoutOf for LayoutCx < ' tcx , ty:: query:: TyCtxtAt < ' tcx > > {
2069+ impl LayoutOf < ' tcx > for LayoutCx < ' tcx , ty:: query:: TyCtxtAt < ' tcx > > {
20702070 type Ty = Ty < ' tcx > ;
20712071 type TyAndLayout = Result < TyAndLayout < ' tcx > , LayoutError < ' tcx > > ;
20722072
@@ -2080,9 +2080,7 @@ impl LayoutOf for LayoutCx<'tcx, ty::query::TyCtxtAt<'tcx>> {
20802080
20812081impl < ' tcx , C > TyAndLayoutMethods < ' tcx , C > for Ty < ' tcx >
20822082where
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 > ,
20862084{
20872085 fn for_variant (
20882086 this : TyAndLayout < ' tcx > ,
@@ -2135,21 +2133,19 @@ where
21352133 }
21362134
21372135 fn field ( this : TyAndLayout < ' tcx > , cx : & C , i : usize ) -> C :: TyAndLayout {
2138- enum TyMaybeWithLayout < C : LayoutOf > {
2136+ enum TyMaybeWithLayout < ' tcx , C : LayoutOf < ' tcx > > {
21392137 Ty ( C :: Ty ) ,
21402138 TyAndLayout ( C :: TyAndLayout ) ,
21412139 }
21422140
21432141 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 > ,
21472143 > (
21482144 this : TyAndLayout < ' tcx > ,
21492145 cx : & C ,
21502146 i : usize ,
21512147 ty : C :: Ty ,
2152- ) -> TyMaybeWithLayout < C > {
2148+ ) -> TyMaybeWithLayout < ' tcx , C > {
21532149 let tcx = cx. tcx ( ) ;
21542150 let tag_layout = |tag : & Scalar | -> C :: TyAndLayout {
21552151 let layout = Layout :: scalar ( cx, tag. clone ( ) ) ;
@@ -2538,7 +2534,7 @@ impl<'tcx> ty::Instance<'tcx> {
25382534
25392535pub trait FnAbiExt < ' tcx , C >
25402536where
2541- C : LayoutOf < Ty = Ty < ' tcx > , TyAndLayout = TyAndLayout < ' tcx > >
2537+ C : LayoutOf < ' tcx , Ty = Ty < ' tcx > , TyAndLayout = TyAndLayout < ' tcx > >
25422538 + HasDataLayout
25432539 + HasTargetSpec
25442540 + HasTyCtxt < ' tcx >
@@ -2725,7 +2721,7 @@ pub fn conv_from_spec_abi(tcx: TyCtxt<'_>, abi: SpecAbi) -> Conv {
27252721
27262722impl < ' tcx , C > FnAbiExt < ' tcx , C > for call:: FnAbi < ' tcx , Ty < ' tcx > >
27272723where
2728- C : LayoutOf < Ty = Ty < ' tcx > , TyAndLayout = TyAndLayout < ' tcx > >
2724+ C : LayoutOf < ' tcx , Ty = Ty < ' tcx > , TyAndLayout = TyAndLayout < ' tcx > >
27292725 + HasDataLayout
27302726 + HasTargetSpec
27312727 + HasTyCtxt < ' tcx >
@@ -3006,7 +3002,7 @@ where
30063002
30073003fn make_thin_self_ptr < ' tcx , C > ( cx : & C , mut layout : TyAndLayout < ' tcx > ) -> TyAndLayout < ' tcx >
30083004where
3009- C : LayoutOf < Ty = Ty < ' tcx > , TyAndLayout = TyAndLayout < ' tcx > >
3005+ C : LayoutOf < ' tcx , Ty = Ty < ' tcx > , TyAndLayout = TyAndLayout < ' tcx > >
30103006 + HasTyCtxt < ' tcx >
30113007 + HasParamEnv < ' tcx > ,
30123008{
0 commit comments