1
Fork 0

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.
This commit is contained in:
Felix S Klock II 2019-03-26 13:18:17 +01:00 committed by Matthew Jasper
parent b3f62660fe
commit 4ff459f76c

View file

@ -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 { .. }) => {