diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2024-05-15 19:18:38 +0200 |
|---|---|---|
| committer | Antoni Boucher <bouanto@zoho.com> | 2024-07-02 12:20:34 -0400 |
| commit | 580e5ba456a4993794f0c6cbcb67f4b78e8673e5 (patch) | |
| tree | ce05cd0105d6ac848d19134ced25e6fe3707652d | |
| parent | f848dbbda5e5666c3fe9eb805f9eababa6244d50 (diff) | |
| download | rust-580e5ba456a4993794f0c6cbcb67f4b78e8673e5.tar.gz rust-580e5ba456a4993794f0c6cbcb67f4b78e8673e5.zip | |
Format code
| -rw-r--r-- | src/builder.rs | 8 | ||||
| -rw-r--r-- | src/context.rs | 8 | ||||
| -rw-r--r-- | src/intrinsic/simd.rs | 4 |
3 files changed, 9 insertions, 11 deletions
diff --git a/src/builder.rs b/src/builder.rs index 84aa168bcca..41d85bdceb7 100644 --- a/src/builder.rs +++ b/src/builder.rs @@ -25,7 +25,7 @@ use rustc_middle::ty::layout::{ FnAbiError, FnAbiOfHelpers, FnAbiRequest, HasParamEnv, HasTyCtxt, LayoutError, LayoutOfHelpers, TyAndLayout, }; -use rustc_middle::ty::{ParamEnv, Ty, TyCtxt, Instance}; +use rustc_middle::ty::{Instance, ParamEnv, Ty, TyCtxt}; use rustc_span::def_id::DefId; use rustc_span::Span; use rustc_target::abi::{ @@ -904,11 +904,7 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> { // TODO(antoyo): It might be better to return a LValue, but fixing the rustc API is non-trivial. self.stack_var_count.set(self.stack_var_count.get() + 1); self.current_func() - .new_local( - self.location, - ty, - &format!("stack_var_{}", self.stack_var_count.get()), - ) + .new_local(self.location, ty, &format!("stack_var_{}", self.stack_var_count.get())) .get_address(self.location) } diff --git a/src/context.rs b/src/context.rs index 6231b09552c..a082bc1b2fc 100644 --- a/src/context.rs +++ b/src/context.rs @@ -110,7 +110,7 @@ pub struct CodegenCx<'gcc, 'tcx> { local_gen_sym_counter: Cell<usize>, eh_personality: Cell<Option<RValue<'gcc>>>, - #[cfg(feature="master")] + #[cfg(feature = "master")] pub rust_try_fn: Cell<Option<(Type<'gcc>, Function<'gcc>)>>, pub pointee_infos: RefCell<FxHashMap<(Ty<'tcx>, Size), Option<PointeeInfo>>>, @@ -122,7 +122,7 @@ pub struct CodegenCx<'gcc, 'tcx> { /// FIXME(antoyo): fix the rustc API to avoid having this hack. pub structs_as_pointer: RefCell<FxHashSet<RValue<'gcc>>>, - #[cfg(feature="master")] + #[cfg(feature = "master")] pub cleanup_blocks: RefCell<FxHashSet<Block<'gcc>>>, } @@ -324,11 +324,11 @@ impl<'gcc, 'tcx> CodegenCx<'gcc, 'tcx> { struct_types: Default::default(), local_gen_sym_counter: Cell::new(0), eh_personality: Cell::new(None), - #[cfg(feature="master")] + #[cfg(feature = "master")] rust_try_fn: Cell::new(None), pointee_infos: Default::default(), structs_as_pointer: Default::default(), - #[cfg(feature="master")] + #[cfg(feature = "master")] cleanup_blocks: Default::default(), }; // TODO(antoyo): instead of doing this, add SsizeT to libgccjit. diff --git a/src/intrinsic/simd.rs b/src/intrinsic/simd.rs index 1625e6ecdb7..9dfdff1fdcb 100644 --- a/src/intrinsic/simd.rs +++ b/src/intrinsic/simd.rs @@ -816,7 +816,9 @@ pub fn generic_simd_intrinsic<'a, 'gcc, 'tcx>( let (_, element_ty0) = arg_tys[0].simd_size_and_type(bx.tcx()); let (_, element_ty1) = arg_tys[1].simd_size_and_type(bx.tcx()); let (pointer_count, underlying_ty) = match *element_ty1.kind() { - ty::RawPtr(p_ty, _) if p_ty == in_elem => (ptr_count(element_ty1), non_ptr(element_ty1)), + ty::RawPtr(p_ty, _) if p_ty == in_elem => { + (ptr_count(element_ty1), non_ptr(element_ty1)) + } _ => { require!( false, |
