@@ -1371,7 +1371,8 @@ impl<T, E> MaybeResult<T> for Result<T, E> {
1371
1371
}
1372
1372
}
1373
1373
1374
- impl < ' a , ' tcx > LayoutOf < Ty < ' tcx > > for LayoutCx < ' tcx , TyCtxt < ' a , ' tcx , ' tcx > > {
1374
+ impl < ' a , ' tcx > LayoutOf for LayoutCx < ' tcx , TyCtxt < ' a , ' tcx , ' tcx > > {
1375
+ type Ty = Ty < ' tcx > ;
1375
1376
type TyLayout = Result < TyLayout < ' tcx > , LayoutError < ' tcx > > ;
1376
1377
1377
1378
/// Computes the layout of a type. Note that this implicitly
@@ -1397,7 +1398,8 @@ impl<'a, 'tcx> LayoutOf<Ty<'tcx>> for LayoutCx<'tcx, TyCtxt<'a, 'tcx, 'tcx>> {
1397
1398
}
1398
1399
}
1399
1400
1400
- impl < ' a , ' tcx > LayoutOf < Ty < ' tcx > > for LayoutCx < ' tcx , ty:: maps:: TyCtxtAt < ' a , ' tcx , ' tcx > > {
1401
+ impl < ' a , ' tcx > LayoutOf for LayoutCx < ' tcx , ty:: maps:: TyCtxtAt < ' a , ' tcx , ' tcx > > {
1402
+ type Ty = Ty < ' tcx > ;
1401
1403
type TyLayout = Result < TyLayout < ' tcx > , LayoutError < ' tcx > > ;
1402
1404
1403
1405
/// Computes the layout of a type. Note that this implicitly
@@ -1458,7 +1460,7 @@ impl<'a, 'tcx> ty::maps::TyCtxtAt<'a, 'tcx, 'tcx> {
1458
1460
1459
1461
impl < ' a , ' tcx > TyLayout < ' tcx > {
1460
1462
pub fn for_variant < C > ( & self , cx : C , variant_index : usize ) -> Self
1461
- where C : LayoutOf < Ty < ' tcx > > + HasTyCtxt < ' tcx > ,
1463
+ where C : LayoutOf < Ty = Ty < ' tcx > > + HasTyCtxt < ' tcx > ,
1462
1464
C :: TyLayout : MaybeResult < TyLayout < ' tcx > >
1463
1465
{
1464
1466
let details = match self . variants {
@@ -1495,7 +1497,7 @@ impl<'a, 'tcx> TyLayout<'tcx> {
1495
1497
}
1496
1498
1497
1499
pub fn field < C > ( & self , cx : C , i : usize ) -> C :: TyLayout
1498
- where C : LayoutOf < Ty < ' tcx > > + HasTyCtxt < ' tcx > ,
1500
+ where C : LayoutOf < Ty = Ty < ' tcx > > + HasTyCtxt < ' tcx > ,
1499
1501
C :: TyLayout : MaybeResult < TyLayout < ' tcx > >
1500
1502
{
1501
1503
let tcx = cx. tcx ( ) ;
@@ -1623,7 +1625,7 @@ impl<'a, 'tcx> TyLayout<'tcx> {
1623
1625
// FIXME(eddyb) traverse already optimized enums.
1624
1626
fn find_niche < C > ( & self , cx : C , count : u128 )
1625
1627
-> Result < Option < ( Size , Scalar , u128 ) > , LayoutError < ' tcx > >
1626
- where C : LayoutOf < Ty < ' tcx > , TyLayout = Result < Self , LayoutError < ' tcx > > > +
1628
+ where C : LayoutOf < Ty = Ty < ' tcx > , TyLayout = Result < Self , LayoutError < ' tcx > > > +
1627
1629
HasTyCtxt < ' tcx >
1628
1630
{
1629
1631
let scalar_component = |scalar : & Scalar , offset| {
0 commit comments