@@ -337,7 +337,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
337
337
}
338
338
339
339
fn suggest_ref_or_clone (
340
- & mut self ,
340
+ & self ,
341
341
mpi : MovePathIndex ,
342
342
move_span : Span ,
343
343
err : & mut Diag < ' tcx > ,
@@ -1125,7 +1125,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
1125
1125
}
1126
1126
1127
1127
pub ( crate ) fn report_use_while_mutably_borrowed (
1128
- & mut self ,
1128
+ & self ,
1129
1129
location : Location ,
1130
1130
( place, _span) : ( Place < ' tcx > , Span ) ,
1131
1131
borrow : & BorrowData < ' tcx > ,
@@ -1174,7 +1174,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
1174
1174
}
1175
1175
1176
1176
pub ( crate ) fn report_conflicting_borrow (
1177
- & mut self ,
1177
+ & self ,
1178
1178
location : Location ,
1179
1179
( place, span) : ( Place < ' tcx > , Span ) ,
1180
1180
gen_borrow_kind : BorrowKind ,
@@ -2463,7 +2463,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
2463
2463
}
2464
2464
2465
2465
fn report_local_value_does_not_live_long_enough (
2466
- & mut self ,
2466
+ & self ,
2467
2467
location : Location ,
2468
2468
name : & str ,
2469
2469
borrow : & BorrowData < ' tcx > ,
@@ -2642,7 +2642,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
2642
2642
}
2643
2643
2644
2644
fn report_thread_local_value_does_not_live_long_enough (
2645
- & mut self ,
2645
+ & self ,
2646
2646
drop_span : Span ,
2647
2647
borrow_span : Span ,
2648
2648
) -> Diag < ' tcx > {
@@ -2663,7 +2663,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
2663
2663
2664
2664
#[ instrument( level = "debug" , skip( self ) ) ]
2665
2665
fn report_temporary_value_does_not_live_long_enough (
2666
- & mut self ,
2666
+ & self ,
2667
2667
location : Location ,
2668
2668
borrow : & BorrowData < ' tcx > ,
2669
2669
drop_span : Span ,
@@ -2921,7 +2921,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
2921
2921
2922
2922
#[ instrument( level = "debug" , skip( self ) ) ]
2923
2923
fn report_escaping_closure_capture (
2924
- & mut self ,
2924
+ & self ,
2925
2925
use_span : UseSpans < ' tcx > ,
2926
2926
var_span : Span ,
2927
2927
fr_name : & RegionName ,
@@ -3031,7 +3031,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
3031
3031
}
3032
3032
3033
3033
fn report_escaping_data (
3034
- & mut self ,
3034
+ & self ,
3035
3035
borrow_span : Span ,
3036
3036
name : & Option < String > ,
3037
3037
upvar_span : Span ,
@@ -3065,7 +3065,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
3065
3065
}
3066
3066
3067
3067
fn get_moved_indexes (
3068
- & mut self ,
3068
+ & self ,
3069
3069
location : Location ,
3070
3070
mpi : MovePathIndex ,
3071
3071
) -> ( Vec < MoveSite > , Vec < Location > ) {
@@ -3854,7 +3854,7 @@ enum AnnotatedBorrowFnSignature<'tcx> {
3854
3854
impl < ' tcx > AnnotatedBorrowFnSignature < ' tcx > {
3855
3855
/// Annotate the provided diagnostic with information about borrow from the fn signature that
3856
3856
/// helps explain.
3857
- pub ( crate ) fn emit ( & self , cx : & mut MirBorrowckCtxt < ' _ , ' tcx > , diag : & mut Diag < ' _ > ) -> String {
3857
+ pub ( crate ) fn emit ( & self , cx : & MirBorrowckCtxt < ' _ , ' tcx > , diag : & mut Diag < ' _ > ) -> String {
3858
3858
match self {
3859
3859
& AnnotatedBorrowFnSignature :: Closure { argument_ty, argument_span } => {
3860
3860
diag. span_label (
0 commit comments