diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-11-23 09:58:36 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2019-11-23 09:58:36 +0000 |
commit | b1821de2c706da525d9818804be522258038f265 (patch) | |
tree | 5d575e11fafbde652773f50297ab14916973f7d8 /crates/ra_hir/src/db.rs | |
parent | 9da07a07eb8ced772082a136b2ac07eea1df4a2e (diff) | |
parent | 8692977d2798831d0aea434277ee54d589aa9be3 (diff) |
Merge #2369
2369: Move lang_items to hir_def r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/db.rs')
-rw-r--r-- | crates/ra_hir/src/db.rs | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/crates/ra_hir/src/db.rs b/crates/ra_hir/src/db.rs index c3f698ea0..cae305f98 100644 --- a/crates/ra_hir/src/db.rs +++ b/crates/ra_hir/src/db.rs | |||
@@ -3,27 +3,25 @@ | |||
3 | use std::sync::Arc; | 3 | use std::sync::Arc; |
4 | 4 | ||
5 | use ra_db::salsa; | 5 | use ra_db::salsa; |
6 | use ra_syntax::SmolStr; | ||
7 | 6 | ||
8 | use crate::{ | 7 | use crate::{ |
9 | debug::HirDebugDatabase, | 8 | debug::HirDebugDatabase, |
10 | ids, | 9 | ids, |
11 | lang_item::{LangItemTarget, LangItems}, | ||
12 | ty::{ | 10 | ty::{ |
13 | method_resolution::CrateImplBlocks, | 11 | method_resolution::CrateImplBlocks, |
14 | traits::{AssocTyValue, Impl}, | 12 | traits::{AssocTyValue, Impl}, |
15 | CallableDef, FnSig, GenericPredicate, InferenceResult, Namespace, Substs, Ty, TypableDef, | 13 | CallableDef, FnSig, GenericPredicate, InferenceResult, Namespace, Substs, Ty, TypableDef, |
16 | TypeCtor, | 14 | TypeCtor, |
17 | }, | 15 | }, |
18 | Crate, DefWithBody, GenericDef, ImplBlock, Module, StructField, Trait, | 16 | Crate, DefWithBody, GenericDef, ImplBlock, StructField, Trait, |
19 | }; | 17 | }; |
20 | 18 | ||
21 | pub use hir_def::db::{ | 19 | pub use hir_def::db::{ |
22 | BodyQuery, BodyWithSourceMapQuery, ConstDataQuery, CrateDefMapQuery, DefDatabase2, | 20 | BodyQuery, BodyWithSourceMapQuery, ConstDataQuery, CrateDefMapQuery, CrateLangItemsQuery, |
23 | DefDatabase2Storage, EnumDataQuery, ExprScopesQuery, FunctionDataQuery, GenericParamsQuery, | 21 | DefDatabase2, DefDatabase2Storage, EnumDataQuery, ExprScopesQuery, FunctionDataQuery, |
24 | ImplDataQuery, InternDatabase, InternDatabaseStorage, RawItemsQuery, | 22 | GenericParamsQuery, ImplDataQuery, InternDatabase, InternDatabaseStorage, LangItemQuery, |
25 | RawItemsWithSourceMapQuery, StaticDataQuery, StructDataQuery, TraitDataQuery, | 23 | ModuleLangItemsQuery, RawItemsQuery, RawItemsWithSourceMapQuery, StaticDataQuery, |
26 | TypeAliasDataQuery, | 24 | StructDataQuery, TraitDataQuery, TypeAliasDataQuery, |
27 | }; | 25 | }; |
28 | pub use hir_expand::db::{ | 26 | pub use hir_expand::db::{ |
29 | AstDatabase, AstDatabaseStorage, AstIdMapQuery, MacroArgQuery, MacroDefQuery, MacroExpandQuery, | 27 | AstDatabase, AstDatabaseStorage, AstIdMapQuery, MacroArgQuery, MacroDefQuery, MacroExpandQuery, |
@@ -34,15 +32,6 @@ pub use hir_expand::db::{ | |||
34 | #[salsa::query_group(DefDatabaseStorage)] | 32 | #[salsa::query_group(DefDatabaseStorage)] |
35 | #[salsa::requires(AstDatabase)] | 33 | #[salsa::requires(AstDatabase)] |
36 | pub trait DefDatabase: HirDebugDatabase + DefDatabase2 { | 34 | pub trait DefDatabase: HirDebugDatabase + DefDatabase2 { |
37 | #[salsa::invoke(LangItems::module_lang_items_query)] | ||
38 | fn module_lang_items(&self, module: Module) -> Option<Arc<LangItems>>; | ||
39 | |||
40 | #[salsa::invoke(LangItems::crate_lang_items_query)] | ||
41 | fn crate_lang_items(&self, krate: Crate) -> Arc<LangItems>; | ||
42 | |||
43 | #[salsa::invoke(LangItems::lang_item_query)] | ||
44 | fn lang_item(&self, start_crate: Crate, item: SmolStr) -> Option<LangItemTarget>; | ||
45 | |||
46 | #[salsa::invoke(crate::code_model::docs::documentation_query)] | 35 | #[salsa::invoke(crate::code_model::docs::documentation_query)] |
47 | fn documentation(&self, def: crate::DocDef) -> Option<crate::Documentation>; | 36 | fn documentation(&self, def: crate::DocDef) -> Option<crate::Documentation>; |
48 | } | 37 | } |