match *rvalue {
Rvalue::Ref(_ /*rgn*/, bk, ref place) => {
let access_kind = match bk {
+ BorrowKind::Shallow => {
+ (Shallow(Some(ArtificialField::ShallowBorrow)), Read(ReadKind::Borrow(bk)))
+ },
BorrowKind::Shared => (Deep, Read(ReadKind::Borrow(bk))),
BorrowKind::Unique | BorrowKind::Mut { .. } => {
let wk = WriteKind::MutableBorrow(bk);
// have already taken the reservation
}
- (Read(_), BorrowKind::Shared) | (Reservation(..), BorrowKind::Shared) => {
- // Reads/reservations don't invalidate shared borrows
+ (Read(_), BorrowKind::Shallow) | (Reservation(..), BorrowKind::Shallow)
+ | (Read(_), BorrowKind::Shared) | (Reservation(..), BorrowKind::Shared) => {
+ // Reads/reservations don't invalidate shared or shallow borrows
}
(Read(_), BorrowKind::Unique) | (Read(_), BorrowKind::Mut { .. }) => {