about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJannis Christopher Köhl <mail@koehl.dev>2022-10-13 01:02:18 +0200
committerJannis Christopher Köhl <mail@koehl.dev>2022-11-07 10:35:22 +0100
commit890fae9c60debadd0ce80e67ac1b4d6d8bf5c81e (patch)
tree6880653373a62668a98f338b0c4d989fc9314654
parentaaa35b3e48b768315a5f53b8523435f27b708d25 (diff)
downloadrust-890fae9c60debadd0ce80e67ac1b4d6d8bf5c81e.tar.gz
rust-890fae9c60debadd0ce80e67ac1b4d6d8bf5c81e.zip
Fix rebased CastKind
-rw-r--r--compiler/rustc_mir_transform/src/dataflow_const_prop.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/compiler/rustc_mir_transform/src/dataflow_const_prop.rs b/compiler/rustc_mir_transform/src/dataflow_const_prop.rs
index c7340270506..f30dc741abb 100644
--- a/compiler/rustc_mir_transform/src/dataflow_const_prop.rs
+++ b/compiler/rustc_mir_transform/src/dataflow_const_prop.rs
@@ -96,7 +96,14 @@ impl<'tcx> ValueAnalysis<'tcx> for ConstAnalysis<'tcx> {
         state: &mut State<Self::Value>,
     ) -> ValueOrPlaceOrRef<Self::Value> {
         match rvalue {
-            Rvalue::Cast(CastKind::Misc, operand, ty) => {
+            Rvalue::Cast(
+                CastKind::IntToInt
+                | CastKind::FloatToInt
+                | CastKind::FloatToFloat
+                | CastKind::IntToFloat,
+                operand,
+                ty,
+            ) => {
                 let operand = self.eval_operand(operand, state);
                 match operand {
                     FlatSet::Elem(operand) => self