File tree 3 files changed +7
-18
lines changed
3 files changed +7
-18
lines changed Original file line number Diff line number Diff line change @@ -470,10 +470,7 @@ pub(crate) fn codegen_terminator_call<'tcx>(
470
470
// FIXME find a cleaner way to support varargs
471
471
if fn_sig. c_variadic {
472
472
if !matches ! ( fn_sig. abi, Abi :: C { .. } ) {
473
- fx. tcx . sess . span_fatal (
474
- span,
475
- & format ! ( "Variadic call for non-C abi {:?}" , fn_sig. abi) ,
476
- ) ;
473
+ fx. tcx . sess . span_fatal ( span, & format ! ( "Variadic call for non-C abi {:?}" , fn_sig. abi) ) ;
477
474
}
478
475
let sig_ref = fx. bcx . func . dfg . call_signature ( call_inst) . unwrap ( ) ;
479
476
let abi_params = call_args
Original file line number Diff line number Diff line change @@ -839,18 +839,15 @@ fn codegen_stmt<'tcx>(
839
839
StatementKind :: CopyNonOverlapping ( inner) => {
840
840
let dst = codegen_operand ( fx, & inner. dst ) ;
841
841
let pointee = dst
842
- . layout ( )
843
- . pointee_info_at ( fx, rustc_target:: abi:: Size :: ZERO )
844
- . expect ( "Expected pointer" ) ;
842
+ . layout ( )
843
+ . pointee_info_at ( fx, rustc_target:: abi:: Size :: ZERO )
844
+ . expect ( "Expected pointer" ) ;
845
845
let dst = dst. load_scalar ( fx) ;
846
846
let src = codegen_operand ( fx, & inner. src ) . load_scalar ( fx) ;
847
847
let count = codegen_operand ( fx, & inner. count ) . load_scalar ( fx) ;
848
848
let elem_size: u64 = pointee. size . bytes ( ) ;
849
- let bytes = if elem_size != 1 {
850
- fx. bcx . ins ( ) . imul_imm ( count, elem_size as i64 )
851
- } else {
852
- count
853
- } ;
849
+ let bytes =
850
+ if elem_size != 1 { fx. bcx . ins ( ) . imul_imm ( count, elem_size as i64 ) } else { count } ;
854
851
fx. bcx . call_memcpy ( fx. cx . module . target_config ( ) , dst, src, bytes) ;
855
852
}
856
853
}
Original file line number Diff line number Diff line change 1
- #![ feature(
2
- rustc_private,
3
- decl_macro,
4
- never_type,
5
- hash_drain_filter
6
- ) ]
1
+ #![ feature( rustc_private, decl_macro, never_type, hash_drain_filter) ]
7
2
#![ warn( rust_2018_idioms) ]
8
3
#![ warn( unused_lifetimes) ]
9
4
#![ warn( unreachable_pub) ]
You can’t perform that action at this time.
0 commit comments