@@ -337,7 +337,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
337337 }
338338
339339 fn suggest_ref_or_clone (
340- & mut self ,
340+ & self ,
341341 mpi : MovePathIndex ,
342342 move_span : Span ,
343343 err : & mut Diag < ' tcx > ,
@@ -1125,7 +1125,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
11251125 }
11261126
11271127 pub ( crate ) fn report_use_while_mutably_borrowed (
1128- & mut self ,
1128+ & self ,
11291129 location : Location ,
11301130 ( place, _span) : ( Place < ' tcx > , Span ) ,
11311131 borrow : & BorrowData < ' tcx > ,
@@ -1174,7 +1174,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
11741174 }
11751175
11761176 pub ( crate ) fn report_conflicting_borrow (
1177- & mut self ,
1177+ & self ,
11781178 location : Location ,
11791179 ( place, span) : ( Place < ' tcx > , Span ) ,
11801180 gen_borrow_kind : BorrowKind ,
@@ -2463,7 +2463,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
24632463 }
24642464
24652465 fn report_local_value_does_not_live_long_enough (
2466- & mut self ,
2466+ & self ,
24672467 location : Location ,
24682468 name : & str ,
24692469 borrow : & BorrowData < ' tcx > ,
@@ -2642,7 +2642,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
26422642 }
26432643
26442644 fn report_thread_local_value_does_not_live_long_enough (
2645- & mut self ,
2645+ & self ,
26462646 drop_span : Span ,
26472647 borrow_span : Span ,
26482648 ) -> Diag < ' tcx > {
@@ -2663,7 +2663,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
26632663
26642664 #[ instrument( level = "debug" , skip( self ) ) ]
26652665 fn report_temporary_value_does_not_live_long_enough (
2666- & mut self ,
2666+ & self ,
26672667 location : Location ,
26682668 borrow : & BorrowData < ' tcx > ,
26692669 drop_span : Span ,
@@ -2921,7 +2921,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
29212921
29222922 #[ instrument( level = "debug" , skip( self ) ) ]
29232923 fn report_escaping_closure_capture (
2924- & mut self ,
2924+ & self ,
29252925 use_span : UseSpans < ' tcx > ,
29262926 var_span : Span ,
29272927 fr_name : & RegionName ,
@@ -3031,7 +3031,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
30313031 }
30323032
30333033 fn report_escaping_data (
3034- & mut self ,
3034+ & self ,
30353035 borrow_span : Span ,
30363036 name : & Option < String > ,
30373037 upvar_span : Span ,
@@ -3065,7 +3065,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
30653065 }
30663066
30673067 fn get_moved_indexes (
3068- & mut self ,
3068+ & self ,
30693069 location : Location ,
30703070 mpi : MovePathIndex ,
30713071 ) -> ( Vec < MoveSite > , Vec < Location > ) {
@@ -3854,7 +3854,7 @@ enum AnnotatedBorrowFnSignature<'tcx> {
38543854impl < ' tcx > AnnotatedBorrowFnSignature < ' tcx > {
38553855 /// Annotate the provided diagnostic with information about borrow from the fn signature that
38563856 /// 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 {
38583858 match self {
38593859 & AnnotatedBorrowFnSignature :: Closure { argument_ty, argument_span } => {
38603860 diag. span_label (
0 commit comments