File tree 2 files changed +4
-10
lines changed
2 files changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -709,6 +709,10 @@ fn codegen_stmt<'tcx>(
709
709
let operand = codegen_operand ( fx, operand) ;
710
710
operand. coerce_dyn_star ( fx, lval) ;
711
711
}
712
+ Rvalue :: Cast ( CastKind :: Transmute , ref operand, _to_ty) => {
713
+ let operand = codegen_operand ( fx, operand) ;
714
+ lval. write_cvalue_transmute ( fx, operand) ;
715
+ }
712
716
Rvalue :: Discriminant ( place) => {
713
717
let place = codegen_place ( fx, place) ;
714
718
let value = place. to_cvalue ( fx) ;
Original file line number Diff line number Diff line change @@ -557,16 +557,6 @@ fn codegen_regular_intrinsic_call<'tcx>(
557
557
fx. bcx . ins ( ) . band ( ptr, mask) ;
558
558
}
559
559
560
- sym:: transmute => {
561
- intrinsic_args ! ( fx, args => ( from) ; intrinsic) ;
562
-
563
- if ret. layout ( ) . abi . is_uninhabited ( ) {
564
- crate :: base:: codegen_panic ( fx, "Transmuting to uninhabited type." , source_info) ;
565
- return ;
566
- }
567
-
568
- ret. write_cvalue_transmute ( fx, from) ;
569
- }
570
560
sym:: write_bytes | sym:: volatile_set_memory => {
571
561
intrinsic_args ! ( fx, args => ( dst, val, count) ; intrinsic) ;
572
562
let val = val. load_scalar ( fx) ;
You can’t perform that action at this time.
0 commit comments