diff options
| author | Wesley Wiser <wwiser@gmail.com> | 2019-05-11 12:28:53 -0400 |
|---|---|---|
| committer | Wesley Wiser <wwiser@gmail.com> | 2019-05-19 16:47:03 -0400 |
| commit | 2baab0eaaa8daa0f972b580748815db970ca547d (patch) | |
| tree | ff32f281b9ae7dd3992827b3373a553359f341bf | |
| parent | 3f5c743b531e948788db18ce8d514de06113cb35 (diff) | |
| download | rust-2baab0eaaa8daa0f972b580748815db970ca547d.tar.gz rust-2baab0eaaa8daa0f972b580748815db970ca547d.zip | |
[const-prop] Remove catch all match and add FIXME
| -rw-r--r-- | src/librustc_mir/transform/const_prop.rs | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/librustc_mir/transform/const_prop.rs b/src/librustc_mir/transform/const_prop.rs index 023b7132bd5..86c7f7bbded 100644 --- a/src/librustc_mir/transform/const_prop.rs +++ b/src/librustc_mir/transform/const_prop.rs @@ -743,7 +743,20 @@ impl<'b, 'a, 'tcx> MutVisitor<'tcx> for ConstPropagator<'b, 'a, 'tcx> { } } }, - _ => {} + //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 { .. } => { } } } } |
