Skip to content

Commit d2ca746

Browse files
author
Cameron Zwarich
committed
Remove an unused closure parameter
Remove the unused &Restriction parameter of each_in_scope_restriction's op parameter.
1 parent 2d3f122 commit d2ca746

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/librustc/middle/borrowck/check_loans.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ impl<'a> CheckLoanCtxt<'a> {
192192
pub fn each_in_scope_restriction(&self,
193193
scope_id: ast::NodeId,
194194
loan_path: &LoanPath,
195-
op: |&Loan, &Restriction| -> bool)
195+
op: |&Loan| -> bool)
196196
-> bool {
197197
//! Iterates through all the in-scope restrictions for the
198198
//! given `loan_path`
@@ -204,7 +204,7 @@ impl<'a> CheckLoanCtxt<'a> {
204204
let mut ret = true;
205205
for restr in loan.restrictions.iter() {
206206
if *restr.loan_path == *loan_path {
207-
if !op(loan, restr) {
207+
if !op(loan) {
208208
ret = false;
209209
break;
210210
}
@@ -541,7 +541,7 @@ impl<'a> CheckLoanCtxt<'a> {
541541
// let x = &mut a.b.c; // Restricts a, a.b, and a.b.c
542542
// let y = a; // Conflicts with restriction
543543

544-
self.each_in_scope_restriction(expr_id, use_path, |loan, _restr| {
544+
self.each_in_scope_restriction(expr_id, use_path, |loan| {
545545
if incompatible(loan.kind, borrow_kind) {
546546
ret = UseWhileBorrowed(loan.loan_path.clone(), loan.span);
547547
false
@@ -833,7 +833,7 @@ impl<'a> CheckLoanCtxt<'a> {
833833

834834
let cont = this.each_in_scope_restriction(assignment_id,
835835
&*loan_path,
836-
|loan, _restr| {
836+
|loan| {
837837
this.report_illegal_mutation(assignment_span, &*loan_path, loan);
838838
false
839839
});

0 commit comments

Comments
 (0)