diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs index 8922163adf..8053576623 100644 --- a/crates/ra_hir/src/code_model.rs +++ b/crates/ra_hir/src/code_model.rs @@ -19,7 +19,10 @@ use crate::{ TypeAliasId, }, impl_block::ImplBlock, - name::{BOOL, CHAR, F32, F64, I128, I16, I32, I64, I8, ISIZE, STR, U128, U16, U32, U64, U8, USIZE, SELF_TYPE}, + name::{ + BOOL, CHAR, F32, F64, I128, I16, I32, I64, I8, ISIZE, SELF_TYPE, STR, U128, U16, U32, U64, + U8, USIZE, + }, nameres::{CrateModuleId, ImportId, ModuleScope, Namespace}, resolve::Resolver, traits::{TraitData, TraitItem}, diff --git a/crates/ra_hir/src/generics.rs b/crates/ra_hir/src/generics.rs index 3ad2c551a0..07a59193f0 100644 --- a/crates/ra_hir/src/generics.rs +++ b/crates/ra_hir/src/generics.rs @@ -82,11 +82,7 @@ impl GenericParams { GenericDef::Enum(it) => generics.fill(&*it.source(db).ast, start), GenericDef::Trait(it) => { // traits get the Self type as an implicit first type parameter - generics.params.push(GenericParam { - idx: start, - name: SELF_TYPE, - default: None, - }); + generics.params.push(GenericParam { idx: start, name: SELF_TYPE, default: None }); generics.fill(&*it.source(db).ast, start + 1); } GenericDef::TypeAlias(it) => generics.fill(&*it.source(db).ast, start), diff --git a/crates/ra_hir/src/name.rs b/crates/ra_hir/src/name.rs index 7187953140..5f64b7759e 100644 --- a/crates/ra_hir/src/name.rs +++ b/crates/ra_hir/src/name.rs @@ -112,7 +112,8 @@ pub(crate) const SELF_TYPE: Name = Name::new(SmolStr::new_inline_from_ascii(4, b pub(crate) const MACRO_RULES: Name = Name::new(SmolStr::new_inline_from_ascii(11, b"macro_rules")); pub(crate) const STD: Name = Name::new(SmolStr::new_inline_from_ascii(3, b"std")); pub(crate) const ITER: Name = Name::new(SmolStr::new_inline_from_ascii(4, b"iter")); -pub(crate) const INTO_ITERATOR: Name = Name::new(SmolStr::new_inline_from_ascii(12, b"IntoIterator")); +pub(crate) const INTO_ITERATOR: Name = + Name::new(SmolStr::new_inline_from_ascii(12, b"IntoIterator")); pub(crate) const ITEM: Name = Name::new(SmolStr::new_inline_from_ascii(4, b"Item")); fn resolve_name(text: &SmolStr) -> SmolStr { diff --git a/crates/ra_hir/src/nameres.rs b/crates/ra_hir/src/nameres.rs index 4c5623063a..bbdc606cd9 100644 --- a/crates/ra_hir/src/nameres.rs +++ b/crates/ra_hir/src/nameres.rs @@ -65,8 +65,8 @@ use test_utils::tested_by; use crate::{ diagnostics::DiagnosticSink, either::Either, ids::MacroDefId, - nameres::diagnostics::DefDiagnostic, AstDatabase, AstId, BuiltinType, Crate, - DefDatabase, HirFileId, MacroDef, Module, ModuleDef, Name, Path, PathKind, Trait, + nameres::diagnostics::DefDiagnostic, AstDatabase, AstId, BuiltinType, Crate, DefDatabase, + HirFileId, MacroDef, Module, ModuleDef, Name, Path, PathKind, Trait, }; pub(crate) use self::raw::{ImportSourceMap, RawItems}; diff --git a/crates/ra_hir/src/nameres/collector.rs b/crates/ra_hir/src/nameres/collector.rs index 1c3b453bd0..552a1b6d9e 100644 --- a/crates/ra_hir/src/nameres/collector.rs +++ b/crates/ra_hir/src/nameres/collector.rs @@ -13,8 +13,8 @@ use crate::{ diagnostics::DefDiagnostic, raw, CrateDefMap, CrateModuleId, ItemOrMacro, ModuleData, ModuleDef, PerNs, ReachedFixedPoint, Resolution, ResolveMode, }, - AstId, Const, DefDatabase, Enum, Function, HirFileId, MacroDef, Module, Name, Path, - Static, Struct, Trait, TypeAlias, Union, + AstId, Const, DefDatabase, Enum, Function, HirFileId, MacroDef, Module, Name, Path, Static, + Struct, Trait, TypeAlias, Union, }; pub(super) fn collect_defs(db: &impl DefDatabase, mut def_map: CrateDefMap) -> CrateDefMap { diff --git a/crates/ra_hir/src/ty/infer.rs b/crates/ra_hir/src/ty/infer.rs index 41980a3253..52a49070a1 100644 --- a/crates/ra_hir/src/ty/infer.rs +++ b/crates/ra_hir/src/ty/infer.rs @@ -40,7 +40,7 @@ use crate::{ PatId, Statement, UnaryOp, }, generics::{GenericParams, HasGenericParams}, - name::{SELF_TYPE, INTO_ITERATOR, ITEM, ITER, STD}, + name::{INTO_ITERATOR, ITEM, ITER, SELF_TYPE, STD}, nameres::{Namespace, PerNs}, path::{GenericArg, GenericArgs, PathKind, PathSegment}, resolve::{ @@ -49,8 +49,8 @@ use crate::{ }, ty::infer::diagnostics::InferenceDiagnostic, type_ref::{Mutability, TypeRef}, - AdtDef, ConstData, DefWithBody, FnData, Function, HirDatabase, ImplItem, - ModuleDef, Name, Path, StructField, + AdtDef, ConstData, DefWithBody, FnData, Function, HirDatabase, ImplItem, ModuleDef, Name, Path, + StructField, }; mod unify;