Skip to content

Commit 73626ef

Browse files
committed
Rustfmt
1 parent 56fe51c commit 73626ef

File tree

3 files changed

+7
-18
lines changed

3 files changed

+7
-18
lines changed

src/abi/mod.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -470,10 +470,7 @@ pub(crate) fn codegen_terminator_call<'tcx>(
470470
// FIXME find a cleaner way to support varargs
471471
if fn_sig.c_variadic {
472472
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));
477474
}
478475
let sig_ref = fx.bcx.func.dfg.call_signature(call_inst).unwrap();
479476
let abi_params = call_args

src/base.rs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -839,18 +839,15 @@ fn codegen_stmt<'tcx>(
839839
StatementKind::CopyNonOverlapping(inner) => {
840840
let dst = codegen_operand(fx, &inner.dst);
841841
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");
845845
let dst = dst.load_scalar(fx);
846846
let src = codegen_operand(fx, &inner.src).load_scalar(fx);
847847
let count = codegen_operand(fx, &inner.count).load_scalar(fx);
848848
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 };
854851
fx.bcx.call_memcpy(fx.cx.module.target_config(), dst, src, bytes);
855852
}
856853
}

src/lib.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
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)]
72
#![warn(rust_2018_idioms)]
83
#![warn(unused_lifetimes)]
94
#![warn(unreachable_pub)]

0 commit comments

Comments
 (0)