Skip to content

Commit b0421fa

Browse files
committed
Address review feedback: don't bother skipping reservations paired with activations.
1 parent b75248e commit b0421fa

File tree

1 file changed

+0
-10
lines changed
  • src/librustc_mir/borrow_check

1 file changed

+0
-10
lines changed

src/librustc_mir/borrow_check/mod.rs

-10
Original file line numberDiff line numberDiff line change
@@ -1951,16 +1951,6 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
19511951
// borrows of P, P.a.b, etc.
19521952
let mut elems_incoming = flow_state.borrows.elems_incoming();
19531953
while let Some(i) = elems_incoming.next() {
1954-
// Skip any reservation that has a corresponding current
1955-
// activation. This way, the traversal will visit each
1956-
// borrow_index at most once.
1957-
if let Some(j) = elems_incoming.peek() {
1958-
if i.is_reservation() && j.is_activation() {
1959-
assert_eq!(i.borrow_index(), j.borrow_index());
1960-
continue;
1961-
}
1962-
}
1963-
19641954
let borrowed = &data[i.borrow_index()];
19651955

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

0 commit comments

Comments
 (0)