|
1 | 1 | //! Defines database & queries for name resolution. |
2 | 2 | use base_db::{Crate, RootQueryDb, SourceDatabase, Upcast}; |
3 | 3 | use either::Either; |
4 | | -use hir_expand::{db::ExpandDatabase, HirFileId, MacroDefId}; |
| 4 | +use hir_expand::{HirFileId, MacroDefId, db::ExpandDatabase}; |
5 | 5 | use intern::sym; |
6 | 6 | use la_arena::ArenaMap; |
7 | 7 | use span::{EditionedFileId, MacroCallId}; |
8 | | -use syntax::{ast, AstPtr}; |
| 8 | +use syntax::{AstPtr, ast}; |
9 | 9 | use triomphe::Arc; |
10 | 10 |
|
11 | 11 | use crate::{ |
| 12 | + AttrDefId, BlockId, BlockLoc, ConstBlockId, ConstBlockLoc, ConstId, ConstLoc, DefWithBodyId, |
| 13 | + EnumId, EnumLoc, EnumVariantId, EnumVariantLoc, ExternBlockId, ExternBlockLoc, ExternCrateId, |
| 14 | + ExternCrateLoc, FunctionId, FunctionLoc, GenericDefId, ImplId, ImplLoc, InTypeConstId, |
| 15 | + InTypeConstLoc, LocalFieldId, Macro2Id, Macro2Loc, MacroId, MacroRulesId, MacroRulesLoc, |
| 16 | + MacroRulesLocFlags, ProcMacroId, ProcMacroLoc, StaticId, StaticLoc, StructId, StructLoc, |
| 17 | + TraitAliasId, TraitAliasLoc, TraitId, TraitLoc, TypeAliasId, TypeAliasLoc, UnionId, UnionLoc, |
| 18 | + UseId, UseLoc, VariantId, |
12 | 19 | attr::{Attrs, AttrsWithOwner}, |
13 | 20 | data::{ |
14 | | - adt::{EnumData, EnumVariantData, EnumVariants, StructData, VariantData}, |
15 | 21 | ConstData, ExternCrateDeclData, FunctionData, ImplData, Macro2Data, MacroRulesData, |
16 | 22 | ProcMacroData, StaticData, TraitAliasData, TraitData, TypeAliasData, |
| 23 | + adt::{EnumData, EnumVariantData, EnumVariants, StructData, VariantData}, |
17 | 24 | }, |
18 | | - expr_store::{scope::ExprScopes, Body, BodySourceMap}, |
| 25 | + expr_store::{Body, BodySourceMap, scope::ExprScopes}, |
19 | 26 | generics::GenericParams, |
20 | 27 | import_map::ImportMap, |
21 | 28 | item_tree::{AttrOwner, ItemTree, ItemTreeSourceMaps}, |
22 | 29 | lang_item::{self, LangItem, LangItemTarget, LangItems}, |
23 | 30 | nameres::{ |
| 31 | + DefMap, LocalDefMap, |
24 | 32 | assoc::{ImplItems, TraitItems}, |
25 | 33 | diagnostics::DefDiagnostics, |
26 | | - DefMap, LocalDefMap, |
27 | 34 | }, |
28 | 35 | tt, |
29 | 36 | type_ref::TypesSourceMap, |
30 | 37 | visibility::{self, Visibility}, |
31 | | - AttrDefId, BlockId, BlockLoc, ConstBlockId, ConstBlockLoc, ConstId, ConstLoc, DefWithBodyId, |
32 | | - EnumId, EnumLoc, EnumVariantId, EnumVariantLoc, ExternBlockId, ExternBlockLoc, ExternCrateId, |
33 | | - ExternCrateLoc, FunctionId, FunctionLoc, GenericDefId, ImplId, ImplLoc, InTypeConstId, |
34 | | - InTypeConstLoc, LocalFieldId, Macro2Id, Macro2Loc, MacroId, MacroRulesId, MacroRulesLoc, |
35 | | - MacroRulesLocFlags, ProcMacroId, ProcMacroLoc, StaticId, StaticLoc, StructId, StructLoc, |
36 | | - TraitAliasId, TraitAliasLoc, TraitId, TraitLoc, TypeAliasId, TypeAliasLoc, UnionId, UnionLoc, |
37 | | - UseId, UseLoc, VariantId, |
38 | 38 | }; |
39 | 39 |
|
40 | 40 | use salsa::plumbing::AsId; |
@@ -337,7 +337,7 @@ fn crate_supports_no_std(db: &dyn DefDatabase, crate_id: Crate) -> bool { |
337 | 337 | for output in segments.skip(1) { |
338 | 338 | match output.flat_tokens() { |
339 | 339 | [tt::TokenTree::Leaf(tt::Leaf::Ident(ident))] if ident.sym == sym::no_std => { |
340 | | - return true |
| 340 | + return true; |
341 | 341 | } |
342 | 342 | _ => {} |
343 | 343 | } |
|
0 commit comments