Skip to content

Commit 7d6ad0b

Browse files
committed
[const-prop] Remove catch all match and add FIXME
1 parent 087d241 commit 7d6ad0b

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
@@ -732,7 +732,20 @@ impl<'b, 'a, 'tcx> MutVisitor<'tcx> for ConstPropagator<'b, 'a, 'tcx> {
732732
}
733733
}
734734
},
735-
_ => {}
735+
//none of these have Operands to const-propagate
736+
TerminatorKind::Goto { .. } |
737+
TerminatorKind::Resume |
738+
TerminatorKind::Abort |
739+
TerminatorKind::Return |
740+
TerminatorKind::Unreachable |
741+
TerminatorKind::Drop { .. } |
742+
TerminatorKind::DropAndReplace { .. } |
743+
TerminatorKind::Yield { .. } |
744+
TerminatorKind::GeneratorDrop |
745+
TerminatorKind::FalseEdges { .. } |
746+
TerminatorKind::FalseUnwind { .. } => { }
747+
//FIXME(wesleywiser) Call does have Operands that could be const-propagated
748+
TerminatorKind::Call { .. } => { }
736749
}
737750
}
738751
}

0 commit comments

Comments
 (0)