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 @@ -635,7 +635,12 @@ fn codegen_stmt<'tcx>(
635
635
lval. write_cvalue ( fx, operand. cast_pointer_to ( to_layout) ) ;
636
636
}
637
637
Rvalue :: Cast (
638
- CastKind :: Misc
638
+ CastKind :: IntToInt
639
+ | CastKind :: FloatToFloat
640
+ | CastKind :: FloatToInt
641
+ | CastKind :: IntToFloat
642
+ | CastKind :: FnPtrToPtr
643
+ | CastKind :: PtrToPtr
639
644
| CastKind :: PointerExposeAddress
640
645
| CastKind :: PointerFromExposedAddress ,
641
646
ref operand,
Original file line number Diff line number Diff line change @@ -481,7 +481,16 @@ pub(crate) fn mir_operand_get_const_val<'tcx>(
481
481
match & stmt. kind {
482
482
StatementKind :: Assign ( local_and_rvalue) if & local_and_rvalue. 0 == place => {
483
483
match & local_and_rvalue. 1 {
484
- Rvalue :: Cast ( CastKind :: Misc , operand, ty) => {
484
+ Rvalue :: Cast (
485
+ CastKind :: IntToInt
486
+ | CastKind :: FloatToFloat
487
+ | CastKind :: FloatToInt
488
+ | CastKind :: IntToFloat
489
+ | CastKind :: FnPtrToPtr
490
+ | CastKind :: PtrToPtr ,
491
+ operand,
492
+ ty,
493
+ ) => {
485
494
if computed_const_val. is_some ( ) {
486
495
return None ; // local assigned twice
487
496
}
You can’t perform that action at this time.
0 commit comments