Skip to content

Commit d3903c8

Browse files
Reformat using the new identifier sorting from rustfmt
1 parent 6c69e2f commit d3903c8

File tree

18 files changed

+286
-297
lines changed

18 files changed

+286
-297
lines changed

build_system/src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ use std::ffi::OsStr;
33
use std::path::{Path, PathBuf};
44
use std::{env as std_env, fs};
55

6-
use boml::types::TomlValue;
76
use boml::Toml;
7+
use boml::types::TomlValue;
88

99
use crate::utils::{
1010
create_dir, create_symlink, get_os_name, get_sysroot_dir, run_command_with_output,

build_system/src/test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use std::collections::HashMap;
22
use std::ffi::OsStr;
3-
use std::fs::{remove_dir_all, File};
3+
use std::fs::{File, remove_dir_all};
44
use std::io::{BufRead, BufReader};
55
use std::path::{Path, PathBuf};
66
use std::str::FromStr;

build_system/src/utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use std::collections::HashMap;
2+
use std::ffi::OsStr;
23
#[cfg(unix)]
34
use std::ffi::c_int;
4-
use std::ffi::OsStr;
55
use std::fmt::Debug;
66
use std::fs;
77
#[cfg(unix)]

src/abi.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ use gccjit::{ToLValue, ToRValue, Type};
44
use rustc_codegen_ssa::traits::{AbiBuilderMethods, BaseTypeCodegenMethods};
55
use rustc_data_structures::fx::FxHashSet;
66
use rustc_middle::bug;
7-
use rustc_middle::ty::layout::LayoutOf;
87
use rustc_middle::ty::Ty;
8+
use rustc_middle::ty::layout::LayoutOf;
99
#[cfg(feature = "master")]
1010
use rustc_session::config;
1111
use rustc_target::abi::call::{ArgAttributes, CastTarget, FnAbi, PassMode, Reg, RegKind};

src/allocator.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
use gccjit::FnAttribute;
33
use gccjit::{Context, FunctionType, GlobalKind, ToRValue, Type};
44
use rustc_ast::expand::allocator::{
5-
alloc_error_handler_name, default_fn_name, global_fn_name, AllocatorKind, AllocatorTy,
6-
ALLOCATOR_METHODS, NO_ALLOC_SHIM_IS_UNSTABLE,
5+
ALLOCATOR_METHODS, AllocatorKind, AllocatorTy, NO_ALLOC_SHIM_IS_UNSTABLE,
6+
alloc_error_handler_name, default_fn_name, global_fn_name,
77
};
88
use rustc_middle::bug;
99
use rustc_middle::ty::TyCtxt;

src/back/lto.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,19 @@ use rustc_codegen_ssa::back::lto::{LtoModuleCodegen, SerializedModule, ThinModul
2727
use rustc_codegen_ssa::back::symbol_export;
2828
use rustc_codegen_ssa::back::write::{CodegenContext, FatLtoInput};
2929
use rustc_codegen_ssa::traits::*;
30-
use rustc_codegen_ssa::{looks_like_rust_object_file, ModuleCodegen, ModuleKind};
30+
use rustc_codegen_ssa::{ModuleCodegen, ModuleKind, looks_like_rust_object_file};
3131
use rustc_data_structures::memmap::Mmap;
3232
use rustc_errors::{DiagCtxtHandle, FatalError};
3333
use rustc_hir::def_id::LOCAL_CRATE;
3434
use rustc_middle::bug;
3535
use rustc_middle::dep_graph::WorkProduct;
3636
use rustc_middle::middle::exported_symbols::{SymbolExportInfo, SymbolExportLevel};
3737
use rustc_session::config::{CrateType, Lto};
38-
use tempfile::{tempdir, TempDir};
38+
use tempfile::{TempDir, tempdir};
3939

4040
use crate::back::write::save_temp_bitcode;
4141
use crate::errors::{DynamicLinkingWithLTO, LtoBitcodeFromRlib, LtoDisallowed, LtoDylib};
42-
use crate::{to_gcc_opt_level, GccCodegenBackend, GccContext, SyncContext};
42+
use crate::{GccCodegenBackend, GccContext, SyncContext, to_gcc_opt_level};
4343

4444
/// We keep track of the computed LTO cache keys from the previous
4545
/// session to determine which CGUs we can reuse.

src/base.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use rustc_target::spec::PanicStrategy;
1919

2020
use crate::builder::Builder;
2121
use crate::context::CodegenCx;
22-
use crate::{gcc_util, new_context, GccContext, LockedTargetInfo, SyncContext};
22+
use crate::{GccContext, LockedTargetInfo, SyncContext, gcc_util, new_context};
2323

2424
#[cfg(feature = "master")]
2525
pub fn visibility_to_gcc(linkage: Visibility) -> gccjit::Visibility {

src/builder.rs

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ use gccjit::{
77
BinaryOp, Block, ComparisonOp, Context, Function, LValue, Location, RValue, ToRValue, Type,
88
UnaryOp,
99
};
10-
use rustc_apfloat::{ieee, Float, Round, Status};
10+
use rustc_apfloat::{Float, Round, Status, ieee};
11+
use rustc_codegen_ssa::MemFlags;
1112
use rustc_codegen_ssa::common::{
1213
AtomicOrdering, AtomicRmwBinOp, IntPredicate, RealPredicate, SynchronizationScope, TypeKind,
1314
};
@@ -17,21 +18,20 @@ use rustc_codegen_ssa::traits::{
1718
BackendTypes, BaseTypeCodegenMethods, BuilderMethods, ConstCodegenMethods,
1819
LayoutTypeCodegenMethods, OverflowOp, StaticBuilderMethods,
1920
};
20-
use rustc_codegen_ssa::MemFlags;
2121
use rustc_data_structures::fx::FxHashSet;
2222
use rustc_middle::bug;
2323
use rustc_middle::middle::codegen_fn_attrs::CodegenFnAttrs;
2424
use rustc_middle::ty::layout::{
2525
FnAbiError, FnAbiOfHelpers, FnAbiRequest, HasParamEnv, HasTyCtxt, LayoutError, LayoutOfHelpers,
2626
};
2727
use rustc_middle::ty::{Instance, ParamEnv, Ty, TyCtxt};
28-
use rustc_span::def_id::DefId;
2928
use rustc_span::Span;
29+
use rustc_span::def_id::DefId;
3030
use rustc_target::abi::call::FnAbi;
3131
use rustc_target::abi::{self, Align, HasDataLayout, Size, TargetDataLayout, WrappingRange};
3232
use rustc_target::spec::{HasTargetSpec, HasWasmCAbiOpt, Target, WasmCAbi};
3333

34-
use crate::common::{type_is_pointer, SignType, TypeReflection};
34+
use crate::common::{SignType, TypeReflection, type_is_pointer};
3535
use crate::context::CodegenCx;
3636
use crate::intrinsic::llvm;
3737
use crate::type_of::LayoutGccExt;
@@ -152,11 +152,14 @@ impl<'a, 'gcc, 'tcx> Builder<'a, 'gcc, 'tcx> {
152152
// NOTE: not sure why, but we have the wrong type here.
153153
let int_type = compare_exchange.get_param(2).to_rvalue().get_type();
154154
let src = self.context.new_bitcast(self.location, src, int_type);
155-
self.context.new_call(
156-
self.location,
157-
compare_exchange,
158-
&[dst, expected, src, weak, order, failure_order],
159-
)
155+
self.context.new_call(self.location, compare_exchange, &[
156+
dst,
157+
expected,
158+
src,
159+
weak,
160+
order,
161+
failure_order,
162+
])
160163
}
161164

162165
pub fn assign(&self, lvalue: LValue<'gcc>, value: RValue<'gcc>) {
@@ -1079,11 +1082,9 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> {
10791082
let align = dest.val.align.restrict_for_offset(dest.layout.field(self.cx(), 0).size);
10801083
cg_elem.val.store(self, PlaceRef::new_sized_aligned(current_val, cg_elem.layout, align));
10811084

1082-
let next = self.inbounds_gep(
1083-
self.backend_type(cg_elem.layout),
1084-
current.to_rvalue(),
1085-
&[self.const_usize(1)],
1086-
);
1085+
let next = self.inbounds_gep(self.backend_type(cg_elem.layout), current.to_rvalue(), &[
1086+
self.const_usize(1),
1087+
]);
10871088
self.llbb().add_assignment(self.location, current, next);
10881089
self.br(header_bb);
10891090

src/common.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ use gccjit::{LValue, RValue, ToRValue, Type};
22
use rustc_codegen_ssa::traits::{
33
BaseTypeCodegenMethods, ConstCodegenMethods, MiscCodegenMethods, StaticCodegenMethods,
44
};
5-
use rustc_middle::mir::interpret::{ConstAllocation, GlobalAlloc, Scalar};
65
use rustc_middle::mir::Mutability;
6+
use rustc_middle::mir::interpret::{ConstAllocation, GlobalAlloc, Scalar};
77
use rustc_middle::ty::layout::LayoutOf;
88
use rustc_target::abi::{self, HasDataLayout, Pointer};
99

src/consts.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use rustc_codegen_ssa::traits::{
77
use rustc_hir::def::DefKind;
88
use rustc_middle::middle::codegen_fn_attrs::{CodegenFnAttrFlags, CodegenFnAttrs};
99
use rustc_middle::mir::interpret::{
10-
self, read_target_uint, ConstAllocation, ErrorHandled, Scalar as InterpScalar,
10+
self, ConstAllocation, ErrorHandled, Scalar as InterpScalar, read_target_uint,
1111
};
1212
use rustc_middle::ty::layout::LayoutOf;
1313
use rustc_middle::ty::{self, Instance};

0 commit comments

Comments
 (0)