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>(
633633 lval. write_cvalue ( fx, operand. cast_pointer_to ( to_layout) ) ;
634634 }
635635 Rvalue :: Cast (
636- CastKind :: Misc
636+ CastKind :: IntToInt
637+ | CastKind :: FloatToFloat
638+ | CastKind :: FloatToInt
639+ | CastKind :: IntToFloat
640+ | CastKind :: FnPtrToPtr
641+ | CastKind :: PtrToPtr
637642 | CastKind :: PointerExposeAddress
638643 | CastKind :: PointerFromExposedAddress ,
639644 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>(
490490 match & stmt. kind {
491491 StatementKind :: Assign ( local_and_rvalue) if & local_and_rvalue. 0 == place => {
492492 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+ ) => {
494503 if computed_const_val. is_some ( ) {
495504 return None ; // local assigned twice
496505 }
You can’t perform that action at this time.
0 commit comments