@@ -336,17 +336,10 @@ fn codegen_fn_body(fx: &mut FunctionCx<'_, '_, '_>, start_block: Block) {
336
336
crate :: abi:: codegen_return ( fx) ;
337
337
}
338
338
TerminatorKind :: Assert { cond, expected, msg, target, cleanup : _ } => {
339
- if !fx. tcx . sess . overflow_checks ( ) {
340
- let overflow_not_to_check = match msg {
341
- AssertKind :: OverflowNeg ( ..) => true ,
342
- AssertKind :: Overflow ( op, ..) => op. is_checkable ( ) ,
343
- _ => false ,
344
- } ;
345
- if overflow_not_to_check {
346
- let target = fx. get_block ( * target) ;
347
- fx. bcx . ins ( ) . jump ( target, & [ ] ) ;
348
- continue ;
349
- }
339
+ if !fx. tcx . sess . overflow_checks ( ) && msg. is_optional_overflow_check ( ) {
340
+ let target = fx. get_block ( * target) ;
341
+ fx. bcx . ins ( ) . jump ( target, & [ ] ) ;
342
+ continue ;
350
343
}
351
344
let cond = codegen_operand ( fx, cond) . load_scalar ( fx) ;
352
345
@@ -706,6 +699,10 @@ fn codegen_stmt<'tcx>(
706
699
let operand = codegen_operand ( fx, operand) ;
707
700
operand. coerce_dyn_star ( fx, lval) ;
708
701
}
702
+ Rvalue :: Cast ( CastKind :: Transmute , ref operand, _to_ty) => {
703
+ let operand = codegen_operand ( fx, operand) ;
704
+ lval. write_cvalue_transmute ( fx, operand) ;
705
+ }
709
706
Rvalue :: Discriminant ( place) => {
710
707
let place = codegen_place ( fx, place) ;
711
708
let value = place. to_cvalue ( fx) ;
0 commit comments