@@ -432,8 +432,8 @@ impl<'cg, 'cx, 'tcx, 'gcx> InvalidationGenerator<'cx, 'tcx, 'gcx> {
432432 // have already taken the reservation
433433 }
434434
435- ( Read ( _) , BorrowKind :: Shallow ) | ( Reservation ( .. ) , BorrowKind :: Shallow )
436- | ( Read ( _) , BorrowKind :: Shared ) | ( Reservation ( .. ) , BorrowKind :: Shared )
435+ ( Read ( _) , BorrowKind :: Shallow )
436+ | ( Read ( _) , BorrowKind :: Shared )
437437 | ( Read ( ReadKind :: Borrow ( BorrowKind :: Shallow ) ) , BorrowKind :: Unique )
438438 | ( Read ( ReadKind :: Borrow ( BorrowKind :: Shallow ) ) , BorrowKind :: Mut { .. } ) => {
439439 // Reads/reservations don't invalidate shared or shallow borrows
@@ -452,16 +452,15 @@ impl<'cg, 'cx, 'tcx, 'gcx> InvalidationGenerator<'cx, 'tcx, 'gcx> {
452452 this. generate_invalidates ( borrow_index, context. loc ) ;
453453 }
454454
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+ }
465464 }
466465 Control :: Continue
467466 } ,
0 commit comments