]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_mir/dataflow/impls/storage_liveness.rs
Match MIR statements exhaustively
[rust.git] / src / librustc_mir / dataflow / impls / storage_liveness.rs
index 7508d71945e5f30de4bf7ad47e80f35333cbf08d..2a7c6c2ffc167f50aba6f01fc5026ce54da20180 100644 (file)
@@ -129,7 +129,14 @@ fn before_statement_effect(&self, sets: &mut GenKillSet<Self::Idx>, loc: Locatio
                     sets.gen(place.local);
                 }
             }
-            _ => (),
+
+            // Nothing to do for these. Match exhaustively so this fails to compile when new
+            // variants are added.
+            StatementKind::AscribeUserType(..)
+            | StatementKind::FakeRead(..)
+            | StatementKind::Nop
+            | StatementKind::Retag(..)
+            | StatementKind::StorageLive(..) => {}
         }
     }