@@ -192,7 +192,7 @@ impl<'a> CheckLoanCtxt<'a> {
192
192
pub fn each_in_scope_restriction ( & self ,
193
193
scope_id : ast:: NodeId ,
194
194
loan_path : & LoanPath ,
195
- op : |& Loan , & Restriction | -> bool)
195
+ op: |& Loan | -> bool)
196
196
-> bool {
197
197
//! Iterates through all the in-scope restrictions for the
198
198
//! given `loan_path`
@@ -204,7 +204,7 @@ impl<'a> CheckLoanCtxt<'a> {
204
204
let mut ret = true ;
205
205
for restr in loan. restrictions . iter ( ) {
206
206
if * restr. loan_path == * loan_path {
207
- if !op ( loan, restr ) {
207
+ if !op ( loan) {
208
208
ret = false ;
209
209
break ;
210
210
}
@@ -541,7 +541,7 @@ impl<'a> CheckLoanCtxt<'a> {
541
541
// let x = &mut a.b.c; // Restricts a, a.b, and a.b.c
542
542
// let y = a; // Conflicts with restriction
543
543
544
- self . each_in_scope_restriction ( expr_id, use_path, |loan, _restr | {
544
+ self . each_in_scope_restriction ( expr_id, use_path, |loan| {
545
545
if incompatible ( loan. kind , borrow_kind) {
546
546
ret = UseWhileBorrowed ( loan. loan_path . clone ( ) , loan. span ) ;
547
547
false
@@ -833,7 +833,7 @@ impl<'a> CheckLoanCtxt<'a> {
833
833
834
834
let cont = this. each_in_scope_restriction ( assignment_id,
835
835
& * loan_path,
836
- |loan, _restr | {
836
+ |loan| {
837
837
this. report_illegal_mutation ( assignment_span, & * loan_path, loan) ;
838
838
false
839
839
} ) ;
0 commit comments