about summary refs log tree commit diff
path: root/compiler/rustc_hir/src
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-09-22 19:05:04 -0400
committerMichael Goulet <michael@errs.io>2024-09-22 19:11:29 -0400
commitc682aa162b0d41e21cc6748f4fecfe01efb69d1f (patch)
tree0c31b640e3faacfb187a1509e3da5d5b6ba0109c /compiler/rustc_hir/src
parent1173204b364841b51598744fc69d7c80be10f956 (diff)
downloadrust-c682aa162b0d41e21cc6748f4fecfe01efb69d1f.tar.gz
rust-c682aa162b0d41e21cc6748f4fecfe01efb69d1f.zip
Reformat using the new identifier sorting from rustfmt
Diffstat (limited to 'compiler/rustc_hir/src')
-rw-r--r--compiler/rustc_hir/src/def.rs2
-rw-r--r--compiler/rustc_hir/src/definitions.rs4
-rw-r--r--compiler/rustc_hir/src/diagnostic_items.rs2
-rw-r--r--compiler/rustc_hir/src/hir.rs23
-rw-r--r--compiler/rustc_hir/src/hir_id.rs4
-rw-r--r--compiler/rustc_hir/src/intravisit.rs4
-rw-r--r--compiler/rustc_hir/src/lang_items.rs2
-rw-r--r--compiler/rustc_hir/src/pat_util.rs2
-rw-r--r--compiler/rustc_hir/src/target.rs2
-rw-r--r--compiler/rustc_hir/src/tests.rs2
-rw-r--r--compiler/rustc_hir/src/weak_lang_items.rs2
11 files changed, 25 insertions, 24 deletions
diff --git a/compiler/rustc_hir/src/def.rs b/compiler/rustc_hir/src/def.rs
index 9b4174013a6..3276f516a52 100644
--- a/compiler/rustc_hir/src/def.rs
+++ b/compiler/rustc_hir/src/def.rs
@@ -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;
diff --git a/compiler/rustc_hir/src/definitions.rs b/compiler/rustc_hir/src/definitions.rs
index 8c2be2152ea..9873a58cfe9 100644
--- a/compiler/rustc_hir/src/definitions.rs
+++ b/compiler/rustc_hir/src/definitions.rs
@@ -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.
diff --git a/compiler/rustc_hir/src/diagnostic_items.rs b/compiler/rustc_hir/src/diagnostic_items.rs
index 23a83a5011b..67e9c9eeedc 100644
--- a/compiler/rustc_hir/src/diagnostic_items.rs
+++ b/compiler/rustc_hir/src/diagnostic_items.rs
@@ -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;
 
diff --git a/compiler/rustc_hir/src/hir.rs b/compiler/rustc_hir/src/hir.rs
index f92c6650355..17273f1f8fc 100644
--- a/compiler/rustc_hir/src/hir.rs
+++ b/compiler/rustc_hir/src/hir.rs
@@ -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
+        })
     }
 }
 
diff --git a/compiler/rustc_hir/src/hir_id.rs b/compiler/rustc_hir/src/hir_id.rs
index f2142359935..3fa06620ea8 100644
--- a/compiler/rustc_hir/src/hir_id.rs
+++ b/compiler/rustc_hir/src/hir_id.rs
@@ -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 {
diff --git a/compiler/rustc_hir/src/intravisit.rs b/compiler/rustc_hir/src/intravisit.rs
index a54596e3088..4da32245785 100644
--- a/compiler/rustc_hir/src/intravisit.rs
+++ b/compiler/rustc_hir/src/intravisit.rs
@@ -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::*;
 
diff --git a/compiler/rustc_hir/src/lang_items.rs b/compiler/rustc_hir/src/lang_items.rs
index c148dc7f53b..b161e6ba0fa 100644
--- a/compiler/rustc_hir/src/lang_items.rs
+++ b/compiler/rustc_hir/src/lang_items.rs
@@ -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};
diff --git a/compiler/rustc_hir/src/pat_util.rs b/compiler/rustc_hir/src/pat_util.rs
index 73d1ea40707..2ebbb4a06b6 100644
--- a/compiler/rustc_hir/src/pat_util.rs
+++ b/compiler/rustc_hir/src/pat_util.rs
@@ -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};
diff --git a/compiler/rustc_hir/src/target.rs b/compiler/rustc_hir/src/target.rs
index f43008eda11..155270ca6a7 100644
--- a/compiler/rustc_hir/src/target.rs
+++ b/compiler/rustc_hir/src/target.rs
@@ -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 {
diff --git a/compiler/rustc_hir/src/tests.rs b/compiler/rustc_hir/src/tests.rs
index 16b3c4a9ab6..5c10fa46971 100644
--- a/compiler/rustc_hir/src/tests.rs
+++ b/compiler/rustc_hir/src/tests.rs
@@ -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};
 
diff --git a/compiler/rustc_hir/src/weak_lang_items.rs b/compiler/rustc_hir/src/weak_lang_items.rs
index ca133c5965d..337859cd1fb 100644
--- a/compiler/rustc_hir/src/weak_lang_items.rs
+++ b/compiler/rustc_hir/src/weak_lang_items.rs
@@ -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;