about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJannis Christopher Köhl <mail@koehl.dev>2022-10-23 15:05:03 +0200
committerJannis Christopher Köhl <mail@koehl.dev>2022-11-07 10:35:24 +0100
commitde69d088a46e8f9a70e2ac4b3477211fbaa01580 (patch)
tree2b02b55fe6212d0ad89da0e006da3d021d17a6b2
parentd86acdd72a823fa496b3501c9d656beedf9f124f (diff)
downloadrust-de69d088a46e8f9a70e2ac4b3477211fbaa01580.tar.gz
rust-de69d088a46e8f9a70e2ac4b3477211fbaa01580.zip
Explicitly match all terminators
-rw-r--r--compiler/rustc_mir_dataflow/src/value_analysis.rs13
1 files changed, 11 insertions, 2 deletions
diff --git a/compiler/rustc_mir_dataflow/src/value_analysis.rs b/compiler/rustc_mir_dataflow/src/value_analysis.rs
index 8169c41d995..bfe714342e2 100644
--- a/compiler/rustc_mir_dataflow/src/value_analysis.rs
+++ b/compiler/rustc_mir_dataflow/src/value_analysis.rs
@@ -260,8 +260,17 @@ pub trait ValueAnalysis<'tcx> {
                 // They would have an effect, but are not allowed in this phase.
                 bug!("encountered disallowed terminator");
             }
-            _ => {
-                // The other terminators can be ignored.
+            TerminatorKind::Goto { .. }
+            | TerminatorKind::SwitchInt { .. }
+            | TerminatorKind::Resume
+            | TerminatorKind::Abort
+            | TerminatorKind::Return
+            | TerminatorKind::Unreachable
+            | TerminatorKind::Assert { .. }
+            | TerminatorKind::GeneratorDrop
+            | TerminatorKind::FalseEdge { .. }
+            | TerminatorKind::FalseUnwind { .. } => {
+                // These terminators have no effect on the analysis.
             }
         }
     }