@@ -772,14 +772,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
772
772
Some ( ( issued_span, span) ) ,
773
773
) ;
774
774
775
- self . suggest_using_local_if_applicable (
776
- & mut err,
777
- location,
778
- ( place, span) ,
779
- gen_borrow_kind,
780
- issued_borrow,
781
- explanation,
782
- ) ;
775
+ self . suggest_using_local_if_applicable ( & mut err, location, issued_borrow, explanation) ;
783
776
784
777
err
785
778
}
@@ -789,8 +782,6 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
789
782
& self ,
790
783
err : & mut Diagnostic ,
791
784
location : Location ,
792
- ( place, span) : ( Place < ' tcx > , Span ) ,
793
- gen_borrow_kind : BorrowKind ,
794
785
issued_borrow : & BorrowData < ' tcx > ,
795
786
explanation : BorrowExplanation ,
796
787
) {
@@ -822,7 +813,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
822
813
return ;
823
814
} ;
824
815
let inner_param_uses = find_all_local_uses:: find ( self . body , inner_param. local ) ;
825
- let Some ( ( inner_call_loc, inner_call_term) ) = inner_param_uses. into_iter ( ) . find_map ( |loc| {
816
+ let Some ( ( inner_call_loc, inner_call_term) ) = inner_param_uses. into_iter ( ) . find_map ( |loc| {
826
817
let Either :: Right ( term) = self . body . stmt_at ( loc) else {
827
818
debug ! ( "{:?} is a statement, so it can't be a call" , loc) ;
828
819
return None ;
@@ -833,7 +824,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
833
824
} ;
834
825
debug ! ( "checking call args for uses of inner_param: {:?}" , args) ;
835
826
if args. contains ( & Operand :: Move ( inner_param) ) {
836
- Some ( ( loc, term) )
827
+ Some ( ( loc, term) )
837
828
} else {
838
829
None
839
830
}
0 commit comments