@@ -432,8 +432,8 @@ impl<'cg, 'cx, 'tcx, 'gcx> InvalidationGenerator<'cx, 'tcx, 'gcx> {
432
432
// have already taken the reservation
433
433
}
434
434
435
- ( Read ( _) , BorrowKind :: Shallow ) | ( Reservation ( .. ) , BorrowKind :: Shallow )
436
- | ( Read ( _) , BorrowKind :: Shared ) | ( Reservation ( .. ) , BorrowKind :: Shared )
435
+ ( Read ( _) , BorrowKind :: Shallow )
436
+ | ( Read ( _) , BorrowKind :: Shared )
437
437
| ( Read ( ReadKind :: Borrow ( BorrowKind :: Shallow ) ) , BorrowKind :: Unique )
438
438
| ( Read ( ReadKind :: Borrow ( BorrowKind :: Shallow ) ) , BorrowKind :: Mut { .. } ) => {
439
439
// Reads/reservations don't invalidate shared or shallow borrows
@@ -452,16 +452,15 @@ impl<'cg, 'cx, 'tcx, 'gcx> InvalidationGenerator<'cx, 'tcx, 'gcx> {
452
452
this. generate_invalidates ( borrow_index, context. loc ) ;
453
453
}
454
454
455
- ( Reservation ( _) , BorrowKind :: Unique )
456
- | ( Reservation ( _) , BorrowKind :: Mut { .. } )
457
- | ( Activation ( _, _) , _)
458
- | ( Write ( _) , _) => {
459
- // unique or mutable borrows are invalidated by writes.
460
- // Reservations count as writes since we need to check
461
- // that activating the borrow will be OK
462
- // FIXME(bob_twinkles) is this actually the right thing to do?
463
- this. generate_invalidates ( borrow_index, context. loc ) ;
464
- }
455
+ ( Reservation ( _) , _)
456
+ | ( Activation ( _, _) , _)
457
+ | ( Write ( _) , _) => {
458
+ // unique or mutable borrows are invalidated by writes.
459
+ // Reservations count as writes since we need to check
460
+ // that activating the borrow will be OK
461
+ // FIXME(bob_twinkles) is this actually the right thing to do?
462
+ this. generate_invalidates ( borrow_index, context. loc ) ;
463
+ }
465
464
}
466
465
Control :: Continue
467
466
} ,
0 commit comments