about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJonas Schievink <jonasschievink@gmail.com>2020-02-16 21:12:46 +0100
committerJonas Schievink <jonasschievink@gmail.com>2020-02-19 23:13:51 +0100
commitf77d1076ab63dc68c1bce2b8cc08e05b0ea885b0 (patch)
treec7a00544b044ae1361fdae221c84ab4f8fe851d7
parent7d6b8c414e84e1f4f2f40236e83125ba8e034b98 (diff)
downloadrust-f77d1076ab63dc68c1bce2b8cc08e05b0ea885b0.tar.gz
rust-f77d1076ab63dc68c1bce2b8cc08e05b0ea885b0.zip
Match MIR statements exhaustively
-rw-r--r--src/librustc_mir/dataflow/impls/storage_liveness.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/librustc_mir/dataflow/impls/storage_liveness.rs b/src/librustc_mir/dataflow/impls/storage_liveness.rs
index 7508d71945e..2a7c6c2ffc1 100644
--- a/src/librustc_mir/dataflow/impls/storage_liveness.rs
+++ b/src/librustc_mir/dataflow/impls/storage_liveness.rs
@@ -129,7 +129,14 @@ impl<'mir, 'tcx> BitDenotation<'tcx> for RequiresStorage<'mir, 'tcx> {
                     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(..) => {}
         }
     }