@@ -224,10 +224,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
224224 }
225225 }
226226
227- use_spans. var_span_label_path_only (
228- & mut err,
229- format ! ( "{} occurs due to use{}" , desired_action. as_noun( ) , use_spans. describe( ) ) ,
230- ) ;
227+ use_spans. var_path_only_subdiag ( & mut err, desired_action) ;
231228
232229 if !is_loop_move {
233230 err. span_label (
@@ -404,10 +401,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
404401 let used = desired_action. as_general_verb_in_past_tense ( ) ;
405402 let mut err =
406403 struct_span_err ! ( self , span, E0381 , "{used} binding {desc}{isnt_initialized}" ) ;
407- use_spans. var_span_label_path_only (
408- & mut err,
409- format ! ( "{} occurs due to use{}" , desired_action. as_noun( ) , use_spans. describe( ) ) ,
410- ) ;
404+ use_spans. var_path_only_subdiag ( & mut err, desired_action) ;
411405
412406 if let InitializationRequiringAction :: PartialAssignment
413407 | InitializationRequiringAction :: Assignment = desired_action
@@ -678,10 +672,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
678672 err. span_label ( borrow_span, format ! ( "borrow of {} occurs here" , borrow_msg) ) ;
679673 err. span_label ( span, format ! ( "move out of {} occurs here" , value_msg) ) ;
680674
681- borrow_spans. var_span_label_path_only (
682- & mut err,
683- format ! ( "borrow occurs due to use{}" , borrow_spans. describe( ) ) ,
684- ) ;
675+ borrow_spans. var_path_only_subdiag ( & mut err, crate :: InitializationRequiringAction :: Borrow ) ;
685676
686677 move_spans. var_span_label (
687678 & mut err,
0 commit comments