1
Fork 0

Fix rebased CastKind

This commit is contained in:
Jannis Christopher Köhl 2022-10-13 01:02:18 +02:00
parent aaa35b3e48
commit 890fae9c60

View file

@ -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