Skip to content

Commit 2baab0e

Browse files
committed
[const-prop] Remove catch all match and add FIXME
1 parent 3f5c743 commit 2baab0e

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

src/librustc_mir/transform/const_prop.rs

+14-1
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,20 @@ impl<'b, 'a, 'tcx> MutVisitor<'tcx> for ConstPropagator<'b, 'a, 'tcx> {
743743
}
744744
}
745745
},
746-
_ => {}
746+
//none of these have Operands to const-propagate
747+
TerminatorKind::Goto { .. } |
748+
TerminatorKind::Resume |
749+
TerminatorKind::Abort |
750+
TerminatorKind::Return |
751+
TerminatorKind::Unreachable |
752+
TerminatorKind::Drop { .. } |
753+
TerminatorKind::DropAndReplace { .. } |
754+
TerminatorKind::Yield { .. } |
755+
TerminatorKind::GeneratorDrop |
756+
TerminatorKind::FalseEdges { .. } |
757+
TerminatorKind::FalseUnwind { .. } => { }
758+
//FIXME(wesleywiser) Call does have Operands that could be const-propagated
759+
TerminatorKind::Call { .. } => { }
747760
}
748761
}
749762
}

0 commit comments

Comments
 (0)