about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFelix S. Klock II <pnkfelix@pnkfx.org>2017-12-14 16:28:26 -0600
committerFelix S. Klock II <pnkfelix@pnkfx.org>2017-12-14 16:28:26 -0600
commitb0421fa7de7b309cf884ecd9b23f93bbbf237048 (patch)
tree98e5e95daab07d389c0fcb10025ff1c6cf5d35c5
parentb75248ef4eeac4cf06e8cfd2fa6e36ab488eb4d1 (diff)
Address review feedback: don't bother skipping reservations paired with activations.
-rw-r--r--src/librustc_mir/borrow_check/mod.rs10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/librustc_mir/borrow_check/mod.rs b/src/librustc_mir/borrow_check/mod.rs
index 074b4a09a2d..adb4a7a9255 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) {