From b0421fa7de7b309cf884ecd9b23f93bbbf237048 Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Thu, 14 Dec 2017 16:28:26 -0600 Subject: [PATCH] Address review feedback: don't bother skipping reservations paired with activations. --- src/librustc_mir/borrow_check/mod.rs | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/librustc_mir/borrow_check/mod.rs b/src/librustc_mir/borrow_check/mod.rs index 074b4a09a2d4..adb4a7a92554 100644 --- a/src/librustc_mir/borrow_check/mod.rs +++ b/src/librustc_mir/borrow_check/mod.rs @@ -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) {