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>(
635635 lval. write_cvalue ( fx, operand. cast_pointer_to ( to_layout) ) ;
636636 }
637637 Rvalue :: Cast (
638- CastKind :: Misc
638+ CastKind :: IntToInt
639+ | CastKind :: FloatToFloat
640+ | CastKind :: FloatToInt
641+ | CastKind :: IntToFloat
642+ | CastKind :: FnPtrToPtr
643+ | CastKind :: PtrToPtr
639644 | CastKind :: PointerExposeAddress
640645 | CastKind :: PointerFromExposedAddress ,
641646 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>(
481481 match & stmt. kind {
482482 StatementKind :: Assign ( local_and_rvalue) if & local_and_rvalue. 0 == place => {
483483 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+ ) => {
485494 if computed_const_val. is_some ( ) {
486495 return None ; // local assigned twice
487496 }
You can’t perform that action at this time.
0 commit comments