Skip to content

Commit 890fae9

Browse files
committed
Fix rebased CastKind
1 parent aaa35b3 commit 890fae9

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

compiler/rustc_mir_transform/src/dataflow_const_prop.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,14 @@ impl<'tcx> ValueAnalysis<'tcx> for ConstAnalysis<'tcx> {
9696
state: &mut State<Self::Value>,
9797
) -> ValueOrPlaceOrRef<Self::Value> {
9898
match rvalue {
99-
Rvalue::Cast(CastKind::Misc, operand, ty) => {
99+
Rvalue::Cast(
100+
CastKind::IntToInt
101+
| CastKind::FloatToInt
102+
| CastKind::FloatToFloat
103+
| CastKind::IntToFloat,
104+
operand,
105+
ty,
106+
) => {
100107
let operand = self.eval_operand(operand, state);
101108
match operand {
102109
FlatSet::Elem(operand) => self

0 commit comments

Comments
 (0)