@@ -41,7 +41,7 @@ impl<'a, 'gcx, 'tcx> MirBorrowckCtxt<'a, 'gcx, 'tcx> {
4141 let reason;
4242 let access_place_desc = self . describe_place ( access_place) ;
4343
44- if let ( base_place, Some ( projection) ) = the_place_err. final_projection ( self . tcx ) {
44+ if let ( base_place, Some ( projection) ) = the_place_err. split_projection ( self . tcx ) {
4545 match projection {
4646 ProjectionElem :: Deref => {
4747 if base_place. base == PlaceBase :: Local ( Local :: new ( 1 ) )
@@ -188,7 +188,7 @@ impl<'a, 'gcx, 'tcx> MirBorrowckCtxt<'a, 'gcx, 'tcx> {
188188 }
189189 } ;
190190
191- if let ( base_place, Some ( projection) ) = the_place_err. final_projection ( self . tcx ) {
191+ if let ( base_place, Some ( projection) ) = the_place_err. split_projection ( self . tcx ) {
192192 match projection {
193193 ProjectionElem :: Deref => {
194194 if let PlaceBase :: Local ( local) = base_place. base {
@@ -360,7 +360,7 @@ impl<'a, 'gcx, 'tcx> MirBorrowckCtxt<'a, 'gcx, 'tcx> {
360360
361361 // Does this place refer to what the user sees as an upvar
362362 fn is_upvar ( & self , place : & Place < ' tcx > ) -> bool {
363- if let ( base_place, Some ( projection) ) = place. final_projection ( self . tcx ) {
363+ if let ( base_place, Some ( projection) ) = place. split_projection ( self . tcx ) {
364364 match projection {
365365 ProjectionElem :: Field ( _, _) => {
366366 let base_ty = base_place. ty ( self . mir , self . tcx ) . to_ty ( self . tcx ) ;
@@ -370,7 +370,7 @@ impl<'a, 'gcx, 'tcx> MirBorrowckCtxt<'a, 'gcx, 'tcx> {
370370 if let (
371371 ref base_place,
372372 Some ( ProjectionElem :: Field ( upvar_index, _) ) ,
373- ) = base_place. final_projection ( self . tcx ) {
373+ ) = base_place. split_projection ( self . tcx ) {
374374 let base_ty = base_place. ty ( self . mir , self . tcx ) . to_ty ( self . tcx ) ;
375375 is_closure_or_generator ( base_ty)
376376 && self . mir . upvar_decls [ upvar_index. index ( ) ] . by_ref
0 commit comments