Skip to content

Commit

Permalink
just use an iterator
Browse files Browse the repository at this point in the history
  • Loading branch information
nikomatsakis committed Apr 15, 2018
1 parent df233f0 commit 033c4f2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/librustc_mir/borrow_check/mod.rs
Expand Up @@ -2250,9 +2250,8 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {

// check for loan restricting path P being used. Accounts for
// borrows of P, P.a.b, etc.
let mut iter_incoming = flow_state.borrows.iter_incoming();
let borrow_set = self.borrow_set.clone();
while let Some(i) = iter_incoming.next() {
for i in flow_state.borrows.iter_incoming() {
let borrowed = &borrow_set[i];

if self.places_conflict(&borrowed.borrowed_place, place, access) {
Expand Down

0 comments on commit 033c4f2

Please sign in to comment.