@@ -1712,11 +1712,8 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, '_, 'tcx> {
17121712 } ,
17131713 // `OpaqueCast`: only transmutes the type, so no moves there.
17141714 // `Downcast` : only changes information about a `Place` without moving.
1715- // `Subtype` : only transmutes the type, so no moves.
17161715 // So it's safe to skip these.
1717- ProjectionElem :: OpaqueCast ( _)
1718- | ProjectionElem :: Subtype ( _)
1719- | ProjectionElem :: Downcast ( _, _) => ( ) ,
1716+ ProjectionElem :: OpaqueCast ( _) | ProjectionElem :: Downcast ( _, _) => ( ) ,
17201717 }
17211718
17221719 place_ty = place_ty. projection_ty ( tcx, elem) ;
@@ -1940,7 +1937,6 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, '_, 'tcx> {
19401937 for ( place_base, elem) in place. iter_projections ( ) . rev ( ) {
19411938 match elem {
19421939 ProjectionElem :: Index ( _/*operand*/ ) |
1943- ProjectionElem :: Subtype ( _) |
19441940 ProjectionElem :: OpaqueCast ( _) |
19451941 ProjectionElem :: ConstantIndex { .. } |
19461942 // assigning to P[i] requires P to be valid.
@@ -2332,7 +2328,6 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, '_, 'tcx> {
23322328 | ProjectionElem :: Index ( ..)
23332329 | ProjectionElem :: ConstantIndex { .. }
23342330 | ProjectionElem :: Subslice { .. }
2335- | ProjectionElem :: Subtype ( ..)
23362331 | ProjectionElem :: OpaqueCast { .. }
23372332 | ProjectionElem :: Downcast ( ..) => {
23382333 let upvar_field_projection = self . is_upvar_field_projection ( place) ;
0 commit comments