Skip to content

Commit 580e5ba

Browse files
GuillaumeGomezantoyo
authored andcommitted
Format code
1 parent f848dbb commit 580e5ba

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

src/builder.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ use rustc_middle::ty::layout::{
2525
FnAbiError, FnAbiOfHelpers, FnAbiRequest, HasParamEnv, HasTyCtxt, LayoutError, LayoutOfHelpers,
2626
TyAndLayout,
2727
};
28-
use rustc_middle::ty::{ParamEnv, Ty, TyCtxt, Instance};
28+
use rustc_middle::ty::{Instance, ParamEnv, Ty, TyCtxt};
2929
use rustc_span::def_id::DefId;
3030
use rustc_span::Span;
3131
use rustc_target::abi::{
@@ -904,11 +904,7 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> {
904904
// TODO(antoyo): It might be better to return a LValue, but fixing the rustc API is non-trivial.
905905
self.stack_var_count.set(self.stack_var_count.get() + 1);
906906
self.current_func()
907-
.new_local(
908-
self.location,
909-
ty,
910-
&format!("stack_var_{}", self.stack_var_count.get()),
911-
)
907+
.new_local(self.location, ty, &format!("stack_var_{}", self.stack_var_count.get()))
912908
.get_address(self.location)
913909
}
914910

src/context.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ pub struct CodegenCx<'gcc, 'tcx> {
110110
local_gen_sym_counter: Cell<usize>,
111111

112112
eh_personality: Cell<Option<RValue<'gcc>>>,
113-
#[cfg(feature="master")]
113+
#[cfg(feature = "master")]
114114
pub rust_try_fn: Cell<Option<(Type<'gcc>, Function<'gcc>)>>,
115115

116116
pub pointee_infos: RefCell<FxHashMap<(Ty<'tcx>, Size), Option<PointeeInfo>>>,
@@ -122,7 +122,7 @@ pub struct CodegenCx<'gcc, 'tcx> {
122122
/// FIXME(antoyo): fix the rustc API to avoid having this hack.
123123
pub structs_as_pointer: RefCell<FxHashSet<RValue<'gcc>>>,
124124

125-
#[cfg(feature="master")]
125+
#[cfg(feature = "master")]
126126
pub cleanup_blocks: RefCell<FxHashSet<Block<'gcc>>>,
127127
}
128128

@@ -324,11 +324,11 @@ impl<'gcc, 'tcx> CodegenCx<'gcc, 'tcx> {
324324
struct_types: Default::default(),
325325
local_gen_sym_counter: Cell::new(0),
326326
eh_personality: Cell::new(None),
327-
#[cfg(feature="master")]
327+
#[cfg(feature = "master")]
328328
rust_try_fn: Cell::new(None),
329329
pointee_infos: Default::default(),
330330
structs_as_pointer: Default::default(),
331-
#[cfg(feature="master")]
331+
#[cfg(feature = "master")]
332332
cleanup_blocks: Default::default(),
333333
};
334334
// TODO(antoyo): instead of doing this, add SsizeT to libgccjit.

src/intrinsic/simd.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,9 @@ pub fn generic_simd_intrinsic<'a, 'gcc, 'tcx>(
816816
let (_, element_ty0) = arg_tys[0].simd_size_and_type(bx.tcx());
817817
let (_, element_ty1) = arg_tys[1].simd_size_and_type(bx.tcx());
818818
let (pointer_count, underlying_ty) = match *element_ty1.kind() {
819-
ty::RawPtr(p_ty, _) if p_ty == in_elem => (ptr_count(element_ty1), non_ptr(element_ty1)),
819+
ty::RawPtr(p_ty, _) if p_ty == in_elem => {
820+
(ptr_count(element_ty1), non_ptr(element_ty1))
821+
}
820822
_ => {
821823
require!(
822824
false,

0 commit comments

Comments
 (0)