Reformat using the new identifier sorting from rustfmt
This commit is contained in:
parent
1173204b36
commit
c682aa162b
1455 changed files with 7152 additions and 8384 deletions
|
@ -6,10 +6,10 @@ use rustc_ast::NodeId;
|
|||
use rustc_data_structures::stable_hasher::ToStableHashKey;
|
||||
use rustc_data_structures::unord::UnordMap;
|
||||
use rustc_macros::{Decodable, Encodable, HashStable_Generic};
|
||||
use rustc_span::Symbol;
|
||||
use rustc_span::def_id::{DefId, LocalDefId};
|
||||
use rustc_span::hygiene::MacroKind;
|
||||
use rustc_span::symbol::kw;
|
||||
use rustc_span::Symbol;
|
||||
|
||||
use crate::definitions::DefPathData;
|
||||
use crate::hir;
|
||||
|
|
|
@ -11,11 +11,11 @@ use rustc_data_structures::stable_hasher::{Hash64, StableHasher};
|
|||
use rustc_data_structures::unord::UnordMap;
|
||||
use rustc_index::IndexVec;
|
||||
use rustc_macros::{Decodable, Encodable};
|
||||
use rustc_span::symbol::{kw, sym, Symbol};
|
||||
use rustc_span::symbol::{Symbol, kw, sym};
|
||||
use tracing::{debug, instrument};
|
||||
|
||||
pub use crate::def_id::DefPathHash;
|
||||
use crate::def_id::{CrateNum, DefIndex, LocalDefId, StableCrateId, CRATE_DEF_INDEX, LOCAL_CRATE};
|
||||
use crate::def_id::{CRATE_DEF_INDEX, CrateNum, DefIndex, LOCAL_CRATE, LocalDefId, StableCrateId};
|
||||
use crate::def_path_hash_map::DefPathHashMap;
|
||||
|
||||
/// The `DefPathTable` maps `DefIndex`es to `DefKey`s and vice versa.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use rustc_data_structures::fx::FxIndexMap;
|
||||
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
|
||||
use rustc_span::def_id::DefIdMap;
|
||||
use rustc_span::Symbol;
|
||||
use rustc_span::def_id::DefIdMap;
|
||||
|
||||
use crate::def_id::DefId;
|
||||
|
||||
|
|
|
@ -17,18 +17,18 @@ use rustc_macros::{Decodable, Encodable, HashStable_Generic};
|
|||
use rustc_span::def_id::LocalDefId;
|
||||
use rustc_span::hygiene::MacroKind;
|
||||
use rustc_span::source_map::Spanned;
|
||||
use rustc_span::symbol::{kw, sym, Ident, Symbol};
|
||||
use rustc_span::{BytePos, ErrorGuaranteed, Span, DUMMY_SP};
|
||||
use rustc_span::symbol::{Ident, Symbol, kw, sym};
|
||||
use rustc_span::{BytePos, DUMMY_SP, ErrorGuaranteed, Span};
|
||||
use rustc_target::asm::InlineAsmRegOrRegClass;
|
||||
use rustc_target::spec::abi::Abi;
|
||||
use smallvec::SmallVec;
|
||||
use tracing::debug;
|
||||
|
||||
use crate::LangItem;
|
||||
use crate::def::{CtorKind, DefKind, Res};
|
||||
use crate::def_id::{DefId, LocalDefIdMap};
|
||||
pub(crate) use crate::hir_id::{HirId, ItemLocalId, ItemLocalMap, OwnerId};
|
||||
use crate::intravisit::FnKind;
|
||||
use crate::LangItem;
|
||||
|
||||
#[derive(Debug, Copy, Clone, HashStable_Generic)]
|
||||
pub struct Lifetime {
|
||||
|
@ -2589,10 +2589,10 @@ impl<'hir> Ty<'hir> {
|
|||
fn visit_ty(&mut self, t: &'v Ty<'v>) {
|
||||
if matches!(
|
||||
&t.kind,
|
||||
TyKind::Path(QPath::Resolved(
|
||||
_,
|
||||
Path { res: crate::def::Res::SelfTyAlias { .. }, .. },
|
||||
))
|
||||
TyKind::Path(QPath::Resolved(_, Path {
|
||||
res: crate::def::Res::SelfTyAlias { .. },
|
||||
..
|
||||
},))
|
||||
) {
|
||||
self.0.push(t.span);
|
||||
return;
|
||||
|
@ -2920,10 +2920,11 @@ impl<'hir> InlineAsmOperand<'hir> {
|
|||
}
|
||||
|
||||
pub fn is_clobber(&self) -> bool {
|
||||
matches!(
|
||||
self,
|
||||
InlineAsmOperand::Out { reg: InlineAsmRegOrRegClass::Reg(_), late: _, expr: None }
|
||||
)
|
||||
matches!(self, InlineAsmOperand::Out {
|
||||
reg: InlineAsmRegOrRegClass::Reg(_),
|
||||
late: _,
|
||||
expr: None
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,10 +2,10 @@ use std::fmt::{self, Debug};
|
|||
|
||||
use rustc_data_structures::stable_hasher::{HashStable, StableHasher, StableOrd, ToStableHashKey};
|
||||
use rustc_macros::{Decodable, Encodable, HashStable_Generic};
|
||||
use rustc_span::def_id::DefPathHash;
|
||||
use rustc_span::HashStableContext;
|
||||
use rustc_span::def_id::DefPathHash;
|
||||
|
||||
use crate::def_id::{DefId, DefIndex, LocalDefId, CRATE_DEF_ID};
|
||||
use crate::def_id::{CRATE_DEF_ID, DefId, DefIndex, LocalDefId};
|
||||
|
||||
#[derive(Copy, Clone, PartialEq, Eq, Hash, Encodable, Decodable)]
|
||||
pub struct OwnerId {
|
||||
|
|
|
@ -64,11 +64,11 @@
|
|||
//! This order consistency is required in a few places in rustc, for
|
||||
//! example coroutine inference, and possibly also HIR borrowck.
|
||||
|
||||
use rustc_ast::visit::{try_visit, visit_opt, walk_list, VisitorResult};
|
||||
use rustc_ast::visit::{VisitorResult, try_visit, visit_opt, walk_list};
|
||||
use rustc_ast::{Attribute, Label};
|
||||
use rustc_span::Span;
|
||||
use rustc_span::def_id::LocalDefId;
|
||||
use rustc_span::symbol::{Ident, Symbol};
|
||||
use rustc_span::Span;
|
||||
|
||||
use crate::hir::*;
|
||||
|
||||
|
|
|
@ -11,8 +11,8 @@ use rustc_ast as ast;
|
|||
use rustc_data_structures::fx::FxIndexMap;
|
||||
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
|
||||
use rustc_macros::{Decodable, Encodable, HashStable_Generic};
|
||||
use rustc_span::symbol::{kw, sym, Symbol};
|
||||
use rustc_span::Span;
|
||||
use rustc_span::symbol::{Symbol, kw, sym};
|
||||
|
||||
use crate::def_id::DefId;
|
||||
use crate::{MethodKind, Target};
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use std::iter::Enumerate;
|
||||
|
||||
use rustc_span::symbol::Ident;
|
||||
use rustc_span::Span;
|
||||
use rustc_span::symbol::Ident;
|
||||
|
||||
use crate::def::{CtorOf, DefKind, Res};
|
||||
use crate::def_id::{DefId, DefIdSet};
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
use std::fmt::{self, Display};
|
||||
|
||||
use crate::def::DefKind;
|
||||
use crate::{hir, Item, ItemKind, TraitItem, TraitItemKind};
|
||||
use crate::{Item, ItemKind, TraitItem, TraitItemKind, hir};
|
||||
|
||||
#[derive(Copy, Clone, PartialEq, Debug)]
|
||||
pub enum GenericParamKind {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use rustc_data_structures::stable_hasher::Hash64;
|
||||
use rustc_span::def_id::{DefPathHash, StableCrateId};
|
||||
use rustc_span::edition::Edition;
|
||||
use rustc_span::{create_session_globals_then, Symbol};
|
||||
use rustc_span::{Symbol, create_session_globals_then};
|
||||
|
||||
use crate::definitions::{DefKey, DefPathData, DisambiguatedDefPathData};
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
//! Validity checking for weak lang items
|
||||
|
||||
use rustc_span::symbol::{sym, Symbol};
|
||||
use rustc_span::symbol::{Symbol, sym};
|
||||
|
||||
use crate::LangItem;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue