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.rs36
1 files changed, 10 insertions, 26 deletions
diff --git a/crates/ra_hir/src/db.rs b/crates/ra_hir/src/db.rs
index cc03da1e2..0898daa3c 100644
--- a/crates/ra_hir/src/db.rs
+++ b/crates/ra_hir/src/db.rs
@@ -1,15 +1,15 @@
1use std::sync::Arc; 1use std::sync::Arc;
2 2
3use ra_syntax::{SyntaxNode, TreeArc, SourceFile}; 3use ra_syntax::{SyntaxNode, TreeArc, SourceFile};
4use ra_db::{SourceRootId, SyntaxDatabase, salsa}; 4use ra_db::{SyntaxDatabase, CrateId, salsa};
5 5
6use crate::{ 6use crate::{
7 HirInterner, DefId, MacroCallId, Name, HirFileId, 7 DefId, MacroCallId, Name, HirFileId,
8 SourceFileItems, SourceItemId, Crate, 8 SourceFileItems, SourceItemId, Crate, Module, HirInterner,
9 query_definitions, 9 query_definitions,
10 FnSignature, FnScopes, 10 FnSignature, FnScopes,
11 macros::MacroExpansion, 11 macros::MacroExpansion,
12 module_tree::{ModuleId, ModuleTree}, 12 module_tree::ModuleTree,
13 nameres::{ItemMap, lower::{LoweredModule, ImportSourceMap}}, 13 nameres::{ItemMap, lower::{LoweredModule, ImportSourceMap}},
14 ty::{InferenceResult, Ty, method_resolution::CrateImplBlocks}, 14 ty::{InferenceResult, Ty, method_resolution::CrateImplBlocks},
15 adt::{StructData, EnumData, EnumVariantData}, 15 adt::{StructData, EnumData, EnumVariantData},
@@ -56,38 +56,22 @@ pub trait HirDatabase: SyntaxDatabase + AsRef<HirInterner> {
56 fn submodules(&self, source: SourceItemId) -> Arc<Vec<crate::module_tree::Submodule>>; 56 fn submodules(&self, source: SourceItemId) -> Arc<Vec<crate::module_tree::Submodule>>;
57 57
58 #[salsa::invoke(crate::nameres::lower::LoweredModule::lower_module_query)] 58 #[salsa::invoke(crate::nameres::lower::LoweredModule::lower_module_query)]
59 fn lower_module( 59 fn lower_module(&self, module: Module) -> (Arc<LoweredModule>, Arc<ImportSourceMap>);
60 &self,
61 source_root_id: SourceRootId,
62 module_id: ModuleId,
63 ) -> (Arc<LoweredModule>, Arc<ImportSourceMap>);
64 60
65 #[salsa::invoke(crate::nameres::lower::LoweredModule::lower_module_module_query)] 61 #[salsa::invoke(crate::nameres::lower::LoweredModule::lower_module_module_query)]
66 fn lower_module_module( 62 fn lower_module_module(&self, module: Module) -> Arc<LoweredModule>;
67 &self,
68 source_root_id: SourceRootId,
69 module_id: ModuleId,
70 ) -> Arc<LoweredModule>;
71 63
72 #[salsa::invoke(crate::nameres::lower::LoweredModule::lower_module_source_map_query)] 64 #[salsa::invoke(crate::nameres::lower::LoweredModule::lower_module_source_map_query)]
73 fn lower_module_source_map( 65 fn lower_module_source_map(&self, module: Module) -> Arc<ImportSourceMap>;
74 &self,
75 source_root_id: SourceRootId,
76 module_id: ModuleId,
77 ) -> Arc<ImportSourceMap>;
78 66
79 #[salsa::invoke(query_definitions::item_map)] 67 #[salsa::invoke(query_definitions::item_map)]
80 fn item_map(&self, source_root_id: SourceRootId) -> Arc<ItemMap>; 68 fn item_map(&self, crate_id: CrateId) -> Arc<ItemMap>;
81 69
82 #[salsa::invoke(crate::module_tree::ModuleTree::module_tree_query)] 70 #[salsa::invoke(crate::module_tree::ModuleTree::module_tree_query)]
83 fn module_tree(&self, source_root_id: SourceRootId) -> Arc<ModuleTree>; 71 fn module_tree(&self, crate_id: CrateId) -> Arc<ModuleTree>;
84 72
85 #[salsa::invoke(crate::impl_block::impls_in_module)] 73 #[salsa::invoke(crate::impl_block::impls_in_module)]
86 fn impls_in_module( 74 fn impls_in_module(&self, module: Module) -> Arc<ModuleImplBlocks>;
87 &self,
88 source_root_id: SourceRootId,
89 module_id: ModuleId,
90 ) -> Arc<ModuleImplBlocks>;
91 75
92 #[salsa::invoke(crate::ty::method_resolution::CrateImplBlocks::impls_in_crate_query)] 76 #[salsa::invoke(crate::ty::method_resolution::CrateImplBlocks::impls_in_crate_query)]
93 fn impls_in_crate(&self, krate: Crate) -> Arc<CrateImplBlocks>; 77 fn impls_in_crate(&self, krate: Crate) -> Arc<CrateImplBlocks>;