@@ -256,8 +256,8 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
256256 "report_move_out_while_borrowed: location={:?} place={:?} span={:?} borrow={:?}" ,
257257 location, place, span, borrow
258258 ) ;
259- let value_msg = self . describe_place_str ( place. as_ref ( ) ) ;
260- let borrow_msg = self . describe_place_str ( borrow. borrowed_place . as_ref ( ) ) ;
259+ let value_msg = self . describe_any_place ( place. as_ref ( ) ) ;
260+ let borrow_msg = self . describe_any_place ( borrow. borrowed_place . as_ref ( ) ) ;
261261
262262 let borrow_spans = self . retrieve_borrow_spans ( borrow) ;
263263 let borrow_span = borrow_spans. args_or_use ( ) ;
@@ -266,7 +266,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
266266 let span = move_spans. args_or_use ( ) ;
267267
268268 let mut err =
269- self . cannot_move_when_borrowed ( span, & self . describe_place_str ( place. as_ref ( ) ) ) ;
269+ self . cannot_move_when_borrowed ( span, & self . describe_any_place ( place. as_ref ( ) ) ) ;
270270 err. span_label ( borrow_span, format ! ( "borrow of {} occurs here" , borrow_msg) ) ;
271271 err. span_label ( span, format ! ( "move out of {} occurs here" , value_msg) ) ;
272272
@@ -306,14 +306,14 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
306306
307307 let mut err = self . cannot_use_when_mutably_borrowed (
308308 span,
309- & self . describe_place_str ( place. as_ref ( ) ) ,
309+ & self . describe_any_place ( place. as_ref ( ) ) ,
310310 borrow_span,
311- & self . describe_place_str ( borrow. borrowed_place . as_ref ( ) ) ,
311+ & self . describe_any_place ( borrow. borrowed_place . as_ref ( ) ) ,
312312 ) ;
313313
314314 borrow_spans. var_span_label ( & mut err, {
315315 let place = & borrow. borrowed_place ;
316- let desc_place = self . describe_place_str ( place. as_ref ( ) ) ;
316+ let desc_place = self . describe_any_place ( place. as_ref ( ) ) ;
317317 format ! ( "borrow occurs due to use of {}{}" , desc_place, borrow_spans. describe( ) )
318318 } ) ;
319319
@@ -506,7 +506,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
506506 ) ;
507507 } else {
508508 let borrow_place = & issued_borrow. borrowed_place ;
509- let borrow_place_desc = self . describe_place_str ( borrow_place. as_ref ( ) ) ;
509+ let borrow_place_desc = self . describe_any_place ( borrow_place. as_ref ( ) ) ;
510510 issued_spans. var_span_label (
511511 & mut err,
512512 format ! (
@@ -647,12 +647,12 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
647647 && proj_base == target_base. projection
648648 {
649649 return Some ( (
650- self . describe_place_str ( PlaceRef {
650+ self . describe_any_place ( PlaceRef {
651651 local,
652652 projection : proj_base,
653653 } ) ,
654- self . describe_place_str ( first_borrowed_place. as_ref ( ) ) ,
655- self . describe_place_str ( second_borrowed_place. as_ref ( ) ) ,
654+ self . describe_any_place ( first_borrowed_place. as_ref ( ) ) ,
655+ self . describe_any_place ( second_borrowed_place. as_ref ( ) ) ,
656656 union_ty. to_string ( ) ,
657657 ) ) ;
658658 }
@@ -665,7 +665,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
665665 // If we didn't find a field access into a union, or both places match, then
666666 // only return the description of the first place.
667667 (
668- self . describe_place_str ( first_borrowed_place. as_ref ( ) ) ,
668+ self . describe_any_place ( first_borrowed_place. as_ref ( ) ) ,
669669 "" . to_string ( ) ,
670670 "" . to_string ( ) ,
671671 "" . to_string ( ) ,
@@ -1388,7 +1388,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
13881388 let loan_spans = self . retrieve_borrow_spans ( loan) ;
13891389 let loan_span = loan_spans. args_or_use ( ) ;
13901390
1391- let descr_place = self . describe_place_str ( place. as_ref ( ) ) ;
1391+ let descr_place = self . describe_any_place ( place. as_ref ( ) ) ;
13921392 if loan. kind == BorrowKind :: Shallow {
13931393 if let Some ( section) = self . classify_immutable_section ( & loan. assigned_place ) {
13941394 let mut err = self . cannot_mutate_in_immutable_section (
@@ -1463,8 +1463,8 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
14631463 } )
14641464 | Some ( LocalDecl { local_info : LocalInfo :: StaticRef { .. } , .. } )
14651465 | Some ( LocalDecl { local_info : LocalInfo :: Other , .. } )
1466- | None => ( self . describe_place_str ( place. as_ref ( ) ) , assigned_span) ,
1467- Some ( decl) => ( self . describe_place_str ( err_place. as_ref ( ) ) , decl. source_info . span ) ,
1466+ | None => ( self . describe_any_place ( place. as_ref ( ) ) , assigned_span) ,
1467+ Some ( decl) => ( self . describe_any_place ( err_place. as_ref ( ) ) , decl. source_info . span ) ,
14681468 } ;
14691469
14701470 let mut err = self . cannot_reassign_immutable ( span, & place_description, from_arg) ;
0 commit comments