@@ -72,14 +72,14 @@ impl<'cx, 'tcx> Visitor<'tcx> for InvalidationGenerator<'cx, 'tcx> {
7272 self . consume_operand ( location, dst) ;
7373 self . consume_operand ( location, count) ;
7474 }
75- StatementKind :: Nop
75+ // Only relevant for mir typeck
76+ StatementKind :: AscribeUserType ( ..)
77+ // Doesn't have any language semantics
7678 | StatementKind :: Coverage ( ..)
77- | StatementKind :: AscribeUserType ( ..)
78- | StatementKind :: Retag { .. }
79- | StatementKind :: StorageLive ( ..) => {
80- // `Nop`, `AscribeUserType`, `Retag`, and `StorageLive` are irrelevant
81- // to borrow check.
82- }
79+ // Takes a `bool` argument, and has no return value, thus being irrelevant for borrowck
80+ | StatementKind :: Assume ( ..)
81+ // Does not actually affect borrowck
82+ | StatementKind :: StorageLive ( ..) => { }
8383 StatementKind :: StorageDead ( local) => {
8484 self . access_place (
8585 location,
@@ -88,7 +88,10 @@ impl<'cx, 'tcx> Visitor<'tcx> for InvalidationGenerator<'cx, 'tcx> {
8888 LocalMutationIsAllowed :: Yes ,
8989 ) ;
9090 }
91- StatementKind :: Deinit ( ..) | StatementKind :: SetDiscriminant { .. } => {
91+ StatementKind :: Nop
92+ | StatementKind :: Retag { .. }
93+ | StatementKind :: Deinit ( ..)
94+ | StatementKind :: SetDiscriminant { .. } => {
9295 bug ! ( "Statement not allowed in this MIR phase" )
9396 }
9497 }
0 commit comments