Skip to content

Commit

Permalink
Address review feedback: don't bother skipping reservations paired wi…
Browse files Browse the repository at this point in the history
…th activations.
  • Loading branch information
pnkfelix committed Dec 14, 2017
1 parent b75248e commit b0421fa
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/librustc_mir/borrow_check/mod.rs
Expand Up @@ -1951,16 +1951,6 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
// borrows of P, P.a.b, etc.
let mut elems_incoming = flow_state.borrows.elems_incoming();
while let Some(i) = elems_incoming.next() {
// Skip any reservation that has a corresponding current
// activation. This way, the traversal will visit each
// borrow_index at most once.
if let Some(j) = elems_incoming.peek() {
if i.is_reservation() && j.is_activation() {
assert_eq!(i.borrow_index(), j.borrow_index());
continue;
}
}

let borrowed = &data[i.borrow_index()];

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

0 comments on commit b0421fa

Please sign in to comment.