Skip to content
Permalink
Browse files

Fix out-of-date comment

A comment in one match arm make a blanket statement about "reads/reservations", but in fact the whole point of this PR is that reservations are *not* handled by that particular arm anymore.
  • Loading branch information...
pnkfelix authored and matthewjasper committed Mar 26, 2019
1 parent b3f6266 commit 4ff459f76c93708c285c9e415b2880a4415438ef
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/librustc_mir/borrow_check/nll/invalidation.rs
@@ -432,7 +432,7 @@ impl<'cg, 'cx, 'tcx, 'gcx> InvalidationGenerator<'cx, 'tcx, 'gcx> {
| (Read(_), BorrowKind::Shared)
| (Read(ReadKind::Borrow(BorrowKind::Shallow)), BorrowKind::Unique)
| (Read(ReadKind::Borrow(BorrowKind::Shallow)), BorrowKind::Mut { .. }) => {
// Reads/reservations don't invalidate shared or shallow borrows
// Reads don't invalidate shared or shallow borrows
}

(Read(_), BorrowKind::Unique) | (Read(_), BorrowKind::Mut { .. }) => {

0 comments on commit 4ff459f

Please sign in to comment.
You can’t perform that action at this time.