File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -633,7 +633,12 @@ fn codegen_stmt<'tcx>(
633
633
lval. write_cvalue ( fx, operand. cast_pointer_to ( to_layout) ) ;
634
634
}
635
635
Rvalue :: Cast (
636
- CastKind :: Misc
636
+ CastKind :: IntToInt
637
+ | CastKind :: FloatToFloat
638
+ | CastKind :: FloatToInt
639
+ | CastKind :: IntToFloat
640
+ | CastKind :: FnPtrToPtr
641
+ | CastKind :: PtrToPtr
637
642
| CastKind :: PointerExposeAddress
638
643
| CastKind :: PointerFromExposedAddress ,
639
644
ref operand,
Original file line number Diff line number Diff line change @@ -490,7 +490,16 @@ pub(crate) fn mir_operand_get_const_val<'tcx>(
490
490
match & stmt. kind {
491
491
StatementKind :: Assign ( local_and_rvalue) if & local_and_rvalue. 0 == place => {
492
492
match & local_and_rvalue. 1 {
493
- Rvalue :: Cast ( CastKind :: Misc , operand, ty) => {
493
+ Rvalue :: Cast (
494
+ CastKind :: IntToInt
495
+ | CastKind :: FloatToFloat
496
+ | CastKind :: FloatToInt
497
+ | CastKind :: IntToFloat
498
+ | CastKind :: FnPtrToPtr
499
+ | CastKind :: PtrToPtr ,
500
+ operand,
501
+ ty,
502
+ ) => {
494
503
if computed_const_val. is_some ( ) {
495
504
return None ; // local assigned twice
496
505
}
You can’t perform that action at this time.
0 commit comments