Skip to content

Commit 4da6785

Browse files
committed
Rustfmt
1 parent 509054d commit 4da6785

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

src/atomic_shim.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ use crate::prelude::*;
77

88
#[cfg(all(feature = "jit", unix))]
99
#[no_mangle]
10-
static mut __cg_clif_global_atomic_mutex: libc::pthread_mutex_t =
11-
libc::PTHREAD_MUTEX_INITIALIZER;
10+
static mut __cg_clif_global_atomic_mutex: libc::pthread_mutex_t = libc::PTHREAD_MUTEX_INITIALIZER;
1211

1312
pub(crate) fn init_global_lock(
1413
module: &mut impl Module,

src/base.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,8 @@ fn codegen_stmt<'tcx>(
499499
UnOp::Neg => match layout.ty.kind() {
500500
ty::Int(IntTy::I128) => {
501501
// FIXME remove this case once ineg.i128 works
502-
let zero = CValue::const_val(fx, layout, ty::ScalarInt::null(layout.size));
502+
let zero =
503+
CValue::const_val(fx, layout, ty::ScalarInt::null(layout.size));
503504
crate::num::codegen_int_binop(fx, BinOp::Sub, zero, operand)
504505
}
505506
ty::Int(_) => CValue::by_val(fx.bcx.ins().ineg(val), layout),

src/constant.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,7 @@ pub(crate) fn codegen_const_value<'tcx>(
163163
assert!(!layout.is_unsized(), "sized const value");
164164

165165
if layout.is_zst() {
166-
return CValue::by_ref(
167-
crate::Pointer::dangling(layout.align.pref),
168-
layout,
169-
);
166+
return CValue::by_ref(crate::Pointer::dangling(layout.align.pref), layout);
170167
}
171168

172169
match const_val {
@@ -186,9 +183,7 @@ pub(crate) fn codegen_const_value<'tcx>(
186183
}
187184

188185
match x {
189-
Scalar::Int(int) => {
190-
CValue::const_val(fx, layout, int)
191-
}
186+
Scalar::Int(int) => CValue::const_val(fx, layout, int),
192187
Scalar::Ptr(ptr) => {
193188
let alloc_kind = fx.tcx.get_global_alloc(ptr.alloc_id);
194189
let base_addr = match alloc_kind {

0 commit comments

Comments
 (0)