Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit c682aa1

Browse files
committedSep 22, 2024
Reformat using the new identifier sorting from rustfmt
1 parent 1173204 commit c682aa1

File tree

1,455 files changed

+7154
-8386
lines changed

Some content is hidden

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

1,455 files changed

+7154
-8386
lines changed
 

‎compiler/rustc_ast_lowering/src/expr.rs

+15-18
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ use rustc_ast::ptr::P as AstP;
44
use rustc_ast::*;
55
use rustc_data_structures::stack::ensure_sufficient_stack;
66
use rustc_hir as hir;
7-
use rustc_hir::def::{DefKind, Res};
87
use rustc_hir::HirId;
8+
use rustc_hir::def::{DefKind, Res};
99
use rustc_middle::span_bug;
1010
use rustc_session::errors::report_lit_error;
11-
use rustc_span::source_map::{respan, Spanned};
12-
use rustc_span::symbol::{kw, sym, Ident, Symbol};
13-
use rustc_span::{DesugaringKind, Span, DUMMY_SP};
14-
use thin_vec::{thin_vec, ThinVec};
11+
use rustc_span::source_map::{Spanned, respan};
12+
use rustc_span::symbol::{Ident, Symbol, kw, sym};
13+
use rustc_span::{DUMMY_SP, DesugaringKind, Span};
14+
use thin_vec::{ThinVec, thin_vec};
1515

1616
use super::errors::{
1717
AsyncCoroutinesNotSupported, AwaitOnlyInAsyncFnAndBlocks, BaseExpressionDoubleDot,
@@ -23,7 +23,7 @@ use super::{
2323
GenericArgsMode, ImplTraitContext, LoweringContext, ParamMode, ResolverAstLoweringExt,
2424
};
2525
use crate::errors::YieldInClosure;
26-
use crate::{fluent_generated, AllowReturnTypeNotation, FnDeclKind, ImplTraitPosition};
26+
use crate::{AllowReturnTypeNotation, FnDeclKind, ImplTraitPosition, fluent_generated};
2727

2828
impl<'hir> LoweringContext<'_, 'hir> {
2929
fn lower_exprs(&mut self, exprs: &[AstP<Expr>]) -> &'hir [hir::Expr<'hir>] {
@@ -725,18 +725,15 @@ impl<'hir> LoweringContext<'_, 'hir> {
725725
span,
726726
Some(self.allow_gen_future.clone()),
727727
);
728-
self.lower_attrs(
729-
inner_hir_id,
730-
&[Attribute {
731-
kind: AttrKind::Normal(ptr::P(NormalAttr::from_ident(Ident::new(
732-
sym::track_caller,
733-
span,
734-
)))),
735-
id: self.tcx.sess.psess.attr_id_generator.mk_attr_id(),
736-
style: AttrStyle::Outer,
737-
span: unstable_span,
738-
}],
739-
);
728+
self.lower_attrs(inner_hir_id, &[Attribute {
729+
kind: AttrKind::Normal(ptr::P(NormalAttr::from_ident(Ident::new(
730+
sym::track_caller,
731+
span,
732+
)))),
733+
id: self.tcx.sess.psess.attr_id_generator.mk_attr_id(),
734+
style: AttrStyle::Outer,
735+
span: unstable_span,
736+
}]);
740737
}
741738
}
742739

‎compiler/rustc_ast_lowering/src/format.rs

+5-8
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ use rustc_ast::*;
66
use rustc_data_structures::fx::FxIndexMap;
77
use rustc_hir as hir;
88
use rustc_session::config::FmtDebug;
9-
use rustc_span::symbol::{kw, Ident};
10-
use rustc_span::{sym, Span, Symbol};
9+
use rustc_span::symbol::{Ident, kw};
10+
use rustc_span::{Span, Symbol, sym};
1111

1212
use super::LoweringContext;
1313

@@ -363,16 +363,13 @@ fn make_format_spec<'hir>(
363363
debug_hex,
364364
} = &placeholder.format_options;
365365
let fill = ctx.expr_char(sp, fill.unwrap_or(' '));
366-
let align = ctx.expr_lang_item_type_relative(
367-
sp,
368-
hir::LangItem::FormatAlignment,
369-
match alignment {
366+
let align =
367+
ctx.expr_lang_item_type_relative(sp, hir::LangItem::FormatAlignment, match alignment {
370368
Some(FormatAlignment::Left) => sym::Left,
371369
Some(FormatAlignment::Right) => sym::Right,
372370
Some(FormatAlignment::Center) => sym::Center,
373371
None => sym::Unknown,
374-
},
375-
);
372+
});
376373
// This needs to match `Flag` in library/core/src/fmt/rt.rs.
377374
let flags: u32 = ((sign == Some(FormatSign::Plus)) as u32)
378375
| ((sign == Some(FormatSign::Minus)) as u32) << 1

‎compiler/rustc_ast_lowering/src/index.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use rustc_hir::*;
66
use rustc_index::IndexVec;
77
use rustc_middle::span_bug;
88
use rustc_middle::ty::TyCtxt;
9-
use rustc_span::{Span, DUMMY_SP};
9+
use rustc_span::{DUMMY_SP, Span};
1010
use tracing::{debug, instrument};
1111

1212
/// A visitor that walks over the HIR and collects `Node`s into a HIR map.
There was a problem loading the remainder of the diff.

0 commit comments

Comments
 (0)
Failed to load comments.