Skip to content

Commit c682aa1

Browse files
Reformat using the new identifier sorting from rustfmt
1 parent 1173204 commit c682aa1

1,455 files changed

Lines changed: 7154 additions & 8386 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎compiler/rustc_abi/src/layout.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -999,8 +999,8 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
999999
if repr.can_randomize_type_layout() && cfg!(feature = "randomize"){
10001000
#[cfg(feature = "randomize")]
10011001
{
1002-
use rand::seq::SliceRandom;
10031002
use rand::SeedableRng;
1003+
use rand::seq::SliceRandom;
10041004
// `ReprOptions.field_shuffle_seed` is a deterministic seed we can use to randomize field
10051005
// ordering.
10061006
letmut rng =

‎compiler/rustc_abi/src/lib.rs‎

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1138,13 +1138,10 @@ impl Scalar {
11381138
#[inline]
11391139
pubfnis_bool(&self) -> bool{
11401140
useInteger::*;
1141-
matches!(
1142-
self,
1143-
Scalar::Initialized{
1144-
value:Primitive::Int(I8,false),
1145-
valid_range:WrappingRange{ start:0, end:1}
1146-
}
1147-
)
1141+
matches!(self,Scalar::Initialized{
1142+
value:Primitive::Int(I8,false),
1143+
valid_range:WrappingRange{ start:0, end:1}
1144+
})
11481145
}
11491146

11501147
/// Get the primitive representation of this type, ignoring the valid range and whether the

‎compiler/rustc_ast/src/ast.rs‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,19 @@
2121
use std::borrow::Cow;
2222
use std::{cmp, fmt, mem};
2323

24+
pubuseGenericArgs::*;
25+
pubuseUnsafeSource::*;
2426
pubuse rustc_ast_ir::{Movability,Mutability};
2527
use rustc_data_structures::packed::Pu128;
2628
use rustc_data_structures::stable_hasher::{HashStable,StableHasher};
2729
use rustc_data_structures::stack::ensure_sufficient_stack;
2830
use rustc_data_structures::sync::Lrc;
2931
use rustc_macros::{Decodable,Encodable,HashStable_Generic};
30-
use rustc_span::source_map::{respan,Spanned};
31-
use rustc_span::symbol::{kw, sym,Ident,Symbol};
3232
pubuse rustc_span::AttrId;
33-
use rustc_span::{ErrorGuaranteed,Span,DUMMY_SP};
34-
usethin_vec::{thin_vec,ThinVec};
35-
pubuseGenericArgs::*;
36-
pubuseUnsafeSource::*;
33+
use rustc_span::source_map::{Spanned, respan};
34+
userustc_span::symbol::{Ident,Symbol, kw, sym};
35+
userustc_span::{DUMMY_SP,ErrorGuaranteed,Span};
36+
usethin_vec::{ThinVec, thin_vec};
3737

3838
pubusecrate::format::*;
3939
usecrate::ptr::P;
@@ -288,7 +288,7 @@ impl ParenthesizedArgs {
288288
}
289289
}
290290

291-
pubusecrate::node_id::{NodeId,CRATE_NODE_ID,DUMMY_NODE_ID};
291+
pubusecrate::node_id::{CRATE_NODE_ID,DUMMY_NODE_ID,NodeId};
292292

293293
/// Modifiers on a trait bound like `~const`, `?` and `!`.
294294
#[derive(Copy,Clone,PartialEq,Eq,Encodable,Decodable,Debug)]

‎compiler/rustc_ast/src/attr/mod.rs‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ use std::iter;
44
use std::sync::atomic::{AtomicU32,Ordering};
55

66
use rustc_index::bit_set::GrowableBitSet;
7-
use rustc_span::symbol::{sym,Ident,Symbol};
87
use rustc_span::Span;
9-
use smallvec::{smallvec,SmallVec};
10-
use thin_vec::{thin_vec,ThinVec};
8+
use rustc_span::symbol::{Ident,Symbol, sym};
9+
use smallvec::{SmallVec, smallvec};
10+
use thin_vec::{ThinVec, thin_vec};
1111

1212
usecrate::ast::{
13-
AttrArgs,AttrArgsEq,AttrId,AttrItem,AttrKind,AttrStyle,AttrVec,Attribute,DelimArgs,
14-
Expr,ExprKind,LitKind,MetaItem,MetaItemKind,MetaItemLit,NestedMetaItem,NormalAttr,Path,
15-
PathSegment,Safety,DUMMY_NODE_ID,
13+
AttrArgs,AttrArgsEq,AttrId,AttrItem,AttrKind,AttrStyle,AttrVec,Attribute,DUMMY_NODE_ID,
14+
DelimArgs,Expr,ExprKind,LitKind,MetaItem,MetaItemKind,MetaItemLit,NestedMetaItem,
15+
NormalAttr,Path,PathSegment,Safety,
1616
};
1717
usecrate::ptr::P;
1818
usecrate::token::{self,CommentKind,Delimiter,Token};

‎compiler/rustc_ast/src/entry.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
use rustc_span::symbol::sym;
21
use rustc_span::Symbol;
2+
use rustc_span::symbol::sym;
33

4-
usecrate::{attr,Attribute};
4+
usecrate::{Attribute, attr};
55

66
#[derive(Debug)]
77
pubenumEntryPointType{

‎compiler/rustc_ast/src/expand/allocator.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use rustc_macros::HashStable_Generic;
2-
use rustc_span::symbol::{sym,Symbol};
2+
use rustc_span::symbol::{Symbol, sym};
33

44
#[derive(Clone,Debug,Copy,Eq,PartialEq,HashStable_Generic)]
55
pubenumAllocatorKind{

‎compiler/rustc_ast/src/format.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
use rustc_data_structures::fx::FxHashMap;
22
use rustc_macros::{Decodable,Encodable};
3-
use rustc_span::symbol::{Ident,Symbol};
43
use rustc_span::Span;
4+
use rustc_span::symbol::{Ident,Symbol};
55

6-
usecrate::ptr::P;
76
usecrate::Expr;
7+
usecrate::ptr::P;
88

99
// Definitions:
1010
//

‎compiler/rustc_ast/src/mut_visit.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ use std::panic;
1313
use rustc_data_structures::flat_map_in_place::FlatMapInPlace;
1414
use rustc_data_structures::stack::ensure_sufficient_stack;
1515
use rustc_data_structures::sync::Lrc;
16+
use rustc_span::Span;
1617
use rustc_span::source_map::Spanned;
1718
use rustc_span::symbol::Ident;
18-
use rustc_span::Span;
19-
use smallvec::{smallvec,Array,SmallVec};
19+
use smallvec::{Array,SmallVec, smallvec};
2020
use thin_vec::ThinVec;
2121

2222
usecrate::ast::*;

‎compiler/rustc_ast/src/token.rs‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
use std::borrow::Cow;
22
use std::fmt;
33

4+
pubuseBinOpToken::*;
5+
pubuseLitKind::*;
6+
pubuseNonterminal::*;
7+
pubuseNtExprKind::*;
8+
pubuseNtPatKind::*;
9+
pubuseTokenKind::*;
410
use rustc_data_structures::stable_hasher::{HashStable,StableHasher};
511
use rustc_data_structures::sync::Lrc;
612
use rustc_macros::{Decodable,Encodable,HashStable_Generic};
713
use rustc_span::edition::Edition;
8-
use rustc_span::symbol::{kw, sym};
914
#[allow(clippy::useless_attribute)]// FIXME: following use of `hidden_glob_reexports` incorrectly triggers `useless_attribute` lint.
1015
#[allow(hidden_glob_reexports)]
1116
use rustc_span::symbol::{Ident,Symbol};
12-
use rustc_span::{ErrorGuaranteed,Span,DUMMY_SP};
13-
pubuseBinOpToken::*;
14-
pubuseLitKind::*;
15-
pubuseNonterminal::*;
16-
pubuseNtExprKind::*;
17-
pubuseNtPatKind::*;
18-
pubuseTokenKind::*;
17+
use rustc_span::symbol::{kw, sym};
18+
use rustc_span::{DUMMY_SP,ErrorGuaranteed,Span};
1919

2020
usecrate::ast;
2121
usecrate::ptr::P;

‎compiler/rustc_ast/src/tokenstream.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
2020
use rustc_data_structures::sync::{self,Lrc};
2121
use rustc_macros::{Decodable,Encodable,HashStable_Generic};
2222
use rustc_serialize::{Decodable,Encodable};
23-
use rustc_span::{sym,Span,SpanDecoder,SpanEncoder,Symbol,DUMMY_SP};
23+
use rustc_span::{DUMMY_SP,Span,SpanDecoder,SpanEncoder,Symbol,sym};
2424

2525
usecrate::ast::{AttrStyle,StmtKind};
2626
usecrate::ast_traits::{HasAttrs,HasTokens};

0 commit comments

Comments
 (0)