@@ -1724,7 +1724,8 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, '_, 'tcx> {
17241724 // So it's safe to skip these.
17251725 ProjectionElem :: OpaqueCast ( _)
17261726 | ProjectionElem :: Subtype ( _)
1727- | ProjectionElem :: Downcast ( _, _) => ( ) ,
1727+ | ProjectionElem :: Downcast ( _, _)
1728+ | ProjectionElem :: UnsafeBinderCast ( _, _) => ( ) ,
17281729 }
17291730
17301731 place_ty = place_ty. projection_ty ( tcx, elem) ;
@@ -1952,7 +1953,8 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, '_, 'tcx> {
19521953 ProjectionElem :: OpaqueCast ( _) |
19531954 ProjectionElem :: ConstantIndex { .. } |
19541955 // assigning to P[i] requires P to be valid.
1955- ProjectionElem :: Downcast ( _/*adt_def*/ , _/*variant_idx*/ ) =>
1956+ ProjectionElem :: Downcast ( _/*adt_def*/ , _/*variant_idx*/ ) |
1957+ ProjectionElem :: UnsafeBinderCast ( ..) =>
19561958 // assigning to (P->variant) is okay if assigning to `P` is okay
19571959 //
19581960 // FIXME: is this true even if P is an adt with a dtor?
@@ -2341,7 +2343,8 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, '_, 'tcx> {
23412343 | ProjectionElem :: Subslice { .. }
23422344 | ProjectionElem :: Subtype ( ..)
23432345 | ProjectionElem :: OpaqueCast { .. }
2344- | ProjectionElem :: Downcast ( ..) => {
2346+ | ProjectionElem :: Downcast ( ..)
2347+ | ProjectionElem :: UnsafeBinderCast ( ..) => {
23452348 let upvar_field_projection = self . is_upvar_field_projection ( place) ;
23462349 if let Some ( field) = upvar_field_projection {
23472350 let upvar = & self . upvars [ field. index ( ) ] ;
0 commit comments