aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/db.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/db.rs')
-rw-r--r--crates/ra_hir/src/db.rs23
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 @@
3use std::sync::Arc; 3use std::sync::Arc;
4 4
5use ra_db::salsa; 5use ra_db::salsa;
6use ra_syntax::SmolStr;
7 6
8use crate::{ 7use 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
21pub use hir_def::db::{ 19pub 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};
28pub use hir_expand::db::{ 26pub 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)]
36pub trait DefDatabase: HirDebugDatabase + DefDatabase2 { 34pub 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}