summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_borrowck/src/invalidation.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_borrowck/src/invalidation.rs')
-rw-r--r--compiler/rustc_borrowck/src/invalidation.rs15
1 files changed, 6 insertions, 9 deletions
diff --git a/compiler/rustc_borrowck/src/invalidation.rs b/compiler/rustc_borrowck/src/invalidation.rs
index b2ff25ecb..0152d89eb 100644
--- a/compiler/rustc_borrowck/src/invalidation.rs
+++ b/compiler/rustc_borrowck/src/invalidation.rs
@@ -128,7 +128,7 @@ impl<'cx, 'tcx> Visitor<'tcx> for InvalidationGenerator<'cx, 'tcx> {
destination,
target: _,
unwind: _,
- from_hir_call: _,
+ call_source: _,
fn_span: _,
} => {
self.consume_operand(location, func);
@@ -255,7 +255,7 @@ impl<'cx, 'tcx> InvalidationGenerator<'cx, 'tcx> {
(Shallow(Some(ArtificialField::ShallowBorrow)), Read(ReadKind::Borrow(bk)))
}
BorrowKind::Shared => (Deep, Read(ReadKind::Borrow(bk))),
- BorrowKind::Unique | BorrowKind::Mut { .. } => {
+ BorrowKind::Mut { .. } => {
let wk = WriteKind::MutableBorrow(bk);
if allow_two_phase_borrow(bk) {
(Deep, Reservation(wk))
@@ -273,7 +273,7 @@ impl<'cx, 'tcx> InvalidationGenerator<'cx, 'tcx> {
Mutability::Mut => (
Deep,
Write(WriteKind::MutableBorrow(BorrowKind::Mut {
- allow_two_phase_borrow: false,
+ kind: mir::MutBorrowKind::Default,
})),
),
Mutability::Not => (Deep, Read(ReadKind::Borrow(BorrowKind::Shared))),
@@ -376,14 +376,11 @@ impl<'cx, 'tcx> InvalidationGenerator<'cx, 'tcx> {
}
(Read(_), BorrowKind::Shallow | BorrowKind::Shared)
- | (
- Read(ReadKind::Borrow(BorrowKind::Shallow)),
- BorrowKind::Unique | BorrowKind::Mut { .. },
- ) => {
+ | (Read(ReadKind::Borrow(BorrowKind::Shallow)), BorrowKind::Mut { .. }) => {
// Reads don't invalidate shared or shallow borrows
}
- (Read(_), BorrowKind::Unique | BorrowKind::Mut { .. }) => {
+ (Read(_), BorrowKind::Mut { .. }) => {
// Reading from mere reservations of mutable-borrows is OK.
if !is_active(&this.dominators, borrow, location) {
// If the borrow isn't active yet, reads don't invalidate it
@@ -425,7 +422,7 @@ impl<'cx, 'tcx> InvalidationGenerator<'cx, 'tcx> {
// only mutable borrows should be 2-phase
assert!(match borrow.kind {
BorrowKind::Shared | BorrowKind::Shallow => false,
- BorrowKind::Unique | BorrowKind::Mut { .. } => true,
+ BorrowKind::Mut { .. } => true,
});
self.access_place(