@@ -347,8 +347,9 @@ impl<'a, 'gcx, 'tcx> MirBorrowckCtxt<'a, 'gcx, 'tcx> {
347
347
_ => false ,
348
348
} ;
349
349
if try_remove_deref && snippet. starts_with ( '*' ) {
350
- // This is false for (e.g.) index expressions `a[b]`,
351
- // which roughly desugar to `*Index::index(&a, b)` or
350
+ // The snippet doesn't start with `*` in (e.g.) index
351
+ // expressions `a[b]`, which roughly desugar to
352
+ // `*Index::index(&a, b)` or
352
353
// `*IndexMut::index_mut(&mut a, b)`.
353
354
err. span_suggestion (
354
355
span,
@@ -365,13 +366,13 @@ impl<'a, 'gcx, 'tcx> MirBorrowckCtxt<'a, 'gcx, 'tcx> {
365
366
366
367
binds_to. sort ( ) ;
367
368
binds_to. dedup ( ) ;
368
- self . add_move_error_labels ( err, & binds_to) ;
369
+ self . add_move_error_details ( err, & binds_to) ;
369
370
}
370
371
GroupedMoveError :: MovesFromValue { mut binds_to, .. } => {
371
372
binds_to. sort ( ) ;
372
373
binds_to. dedup ( ) ;
373
374
self . add_move_error_suggestions ( err, & binds_to) ;
374
- self . add_move_error_labels ( err, & binds_to) ;
375
+ self . add_move_error_details ( err, & binds_to) ;
375
376
}
376
377
// No binding. Nothing to suggest.
377
378
GroupedMoveError :: OtherIllegalMove { .. } => ( ) ,
@@ -428,7 +429,7 @@ impl<'a, 'gcx, 'tcx> MirBorrowckCtxt<'a, 'gcx, 'tcx> {
428
429
}
429
430
}
430
431
431
- fn add_move_error_labels (
432
+ fn add_move_error_details (
432
433
& self ,
433
434
err : & mut DiagnosticBuilder < ' a > ,
434
435
binds_to : & [ Local ] ,
0 commit comments