]> git.lizzy.rs Git - rust.git/commitdiff
[const-prop] Remove catch all match and add FIXME
authorWesley Wiser <wwiser@gmail.com>
Sat, 11 May 2019 16:28:53 +0000 (12:28 -0400)
committerWesley Wiser <wwiser@gmail.com>
Sun, 19 May 2019 20:47:03 +0000 (16:47 -0400)
src/librustc_mir/transform/const_prop.rs

index 023b7132bd58d7cc2b3a0d874a84acc490772c70..86c7f7bbdedccbfda58745f9cd2ba5a1a37b94e8 100644 (file)
@@ -743,7 +743,20 @@ fn visit_terminator(
                     }
                 }
             },
-            _ => {}
+            //none of these have Operands to const-propagate
+            TerminatorKind::Goto { .. } |
+            TerminatorKind::Resume |
+            TerminatorKind::Abort |
+            TerminatorKind::Return |
+            TerminatorKind::Unreachable |
+            TerminatorKind::Drop { .. } |
+            TerminatorKind::DropAndReplace { .. } |
+            TerminatorKind::Yield { .. } |
+            TerminatorKind::GeneratorDrop |
+            TerminatorKind::FalseEdges { .. } |
+            TerminatorKind::FalseUnwind { .. } => { }
+            //FIXME(wesleywiser) Call does have Operands that could be const-propagated
+            TerminatorKind::Call { .. } => { }
         }
     }
 }