@@ -38,8 +38,8 @@ impl<'cx, 'tcx> crate::MirBorrowckCtxt<'cx, 'tcx> {
3838 "cannot use {} because it was mutably borrowed" ,
3939 desc,
4040 )
41- . span_label_mv ( borrow_span, format ! ( "{borrow_desc} is borrowed here" ) )
42- . span_label_mv ( span, format ! ( "use of borrowed {borrow_desc}" ) )
41+ . with_span_label ( borrow_span, format ! ( "{borrow_desc} is borrowed here" ) )
42+ . with_span_label ( span, format ! ( "use of borrowed {borrow_desc}" ) )
4343 }
4444
4545 pub ( crate ) fn cannot_mutably_borrow_multiply (
@@ -243,8 +243,8 @@ impl<'cx, 'tcx> crate::MirBorrowckCtxt<'cx, 'tcx> {
243243 "cannot assign to {} because it is borrowed" ,
244244 desc,
245245 )
246- . span_label_mv ( borrow_span, format ! ( "{desc} is borrowed here" ) )
247- . span_label_mv ( span, format ! ( "{desc} is assigned to here but it was already borrowed" ) )
246+ . with_span_label ( borrow_span, format ! ( "{desc} is borrowed here" ) )
247+ . with_span_label ( span, format ! ( "{desc} is assigned to here but it was already borrowed" ) )
248248 }
249249
250250 pub ( crate ) fn cannot_reassign_immutable (
@@ -297,7 +297,7 @@ impl<'cx, 'tcx> crate::MirBorrowckCtxt<'cx, 'tcx> {
297297 ty,
298298 type_name,
299299 )
300- . span_label_mv ( move_from_span, "cannot move out of here" )
300+ . with_span_label ( move_from_span, "cannot move out of here" )
301301 }
302302
303303 pub ( crate ) fn cannot_move_out_of_interior_of_drop (
@@ -312,7 +312,7 @@ impl<'cx, 'tcx> crate::MirBorrowckCtxt<'cx, 'tcx> {
312312 "cannot move out of type `{}`, which implements the `Drop` trait" ,
313313 container_ty,
314314 )
315- . span_label_mv ( move_from_span, "cannot move out of here" )
315+ . with_span_label ( move_from_span, "cannot move out of here" )
316316 }
317317
318318 pub ( crate ) fn cannot_act_on_moved_value (
@@ -368,8 +368,8 @@ impl<'cx, 'tcx> crate::MirBorrowckCtxt<'cx, 'tcx> {
368368 immutable_place,
369369 immutable_section,
370370 )
371- . span_label_mv ( mutate_span, format ! ( "cannot {action}" ) )
372- . span_label_mv ( immutable_span, format ! ( "value is immutable in {immutable_section}" ) )
371+ . with_span_label ( mutate_span, format ! ( "cannot {action}" ) )
372+ . with_span_label ( immutable_span, format ! ( "value is immutable in {immutable_section}" ) )
373373 }
374374
375375 pub ( crate ) fn cannot_borrow_across_coroutine_yield (
@@ -384,7 +384,7 @@ impl<'cx, 'tcx> crate::MirBorrowckCtxt<'cx, 'tcx> {
384384 E0626 ,
385385 "borrow may still be in use when {coroutine_kind:#} yields" ,
386386 )
387- . span_label_mv ( yield_span, "possible yield occurs here" )
387+ . with_span_label ( yield_span, "possible yield occurs here" )
388388 }
389389
390390 pub ( crate ) fn cannot_borrow_across_destructor (
@@ -423,7 +423,7 @@ impl<'cx, 'tcx> crate::MirBorrowckCtxt<'cx, 'tcx> {
423423 REFERENCE = reference_desc,
424424 LOCAL = path_desc,
425425 )
426- . span_label_mv (
426+ . with_span_label (
427427 span,
428428 format ! ( "{return_kind}s a {reference_desc} data owned by the current function" ) ,
429429 )
@@ -444,8 +444,8 @@ impl<'cx, 'tcx> crate::MirBorrowckCtxt<'cx, 'tcx> {
444444 "{closure_kind} may outlive the current {scope}, but it borrows {borrowed_path}, \
445445 which is owned by the current {scope}",
446446 )
447- . span_label_mv ( capture_span, format ! ( "{borrowed_path} is borrowed here" ) )
448- . span_label_mv ( closure_span, format ! ( "may outlive borrowed value {borrowed_path}" ) )
447+ . with_span_label ( capture_span, format ! ( "{borrowed_path} is borrowed here" ) )
448+ . with_span_label ( closure_span, format ! ( "may outlive borrowed value {borrowed_path}" ) )
449449 }
450450
451451 pub ( crate ) fn thread_local_value_does_not_live_long_enough (
0 commit comments