aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_analysis/src/descriptors/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_analysis/src/descriptors/mod.rs')
-rw-r--r--crates/ra_analysis/src/descriptors/mod.rs18
1 files changed, 16 insertions, 2 deletions
diff --git a/crates/ra_analysis/src/descriptors/mod.rs b/crates/ra_analysis/src/descriptors/mod.rs
index 97750ea64..a5e956024 100644
--- a/crates/ra_analysis/src/descriptors/mod.rs
+++ b/crates/ra_analysis/src/descriptors/mod.rs
@@ -6,13 +6,14 @@ use std::sync::Arc;
6 6
7use ra_syntax::{ 7use ra_syntax::{
8 ast::{self, FnDefNode, AstNode}, 8 ast::{self, FnDefNode, AstNode},
9 TextRange, 9 TextRange, SyntaxNode,
10}; 10};
11 11
12use crate::{ 12use crate::{
13 FileId,
13 db::SyntaxDatabase, 14 db::SyntaxDatabase,
14 descriptors::function::{resolve_local_name, FnId, FnScopes}, 15 descriptors::function::{resolve_local_name, FnId, FnScopes},
15 descriptors::module::{ModuleId, ModuleTree, ModuleSource, nameres::{ItemMap, InputModuleItems}}, 16 descriptors::module::{ModuleId, ModuleTree, ModuleSource, nameres::{ItemMap, InputModuleItems, FileItems}},
16 input::SourceRootId, 17 input::SourceRootId,
17 loc2id::IdDatabase, 18 loc2id::IdDatabase,
18 syntax_ptr::LocalSyntaxPtr, 19 syntax_ptr::LocalSyntaxPtr,
@@ -20,6 +21,7 @@ use crate::{
20}; 21};
21 22
22pub(crate) use self::path::{Path, PathKind}; 23pub(crate) use self::path::{Path, PathKind};
24pub(crate) use self::module::nameres::FileItemId;
23 25
24salsa::query_group! { 26salsa::query_group! {
25 pub(crate) trait DescriptorDatabase: SyntaxDatabase + IdDatabase { 27 pub(crate) trait DescriptorDatabase: SyntaxDatabase + IdDatabase {
@@ -28,6 +30,18 @@ salsa::query_group! {
28 use fn function::imp::fn_scopes; 30 use fn function::imp::fn_scopes;
29 } 31 }
30 32
33 fn _file_items(file_id: FileId) -> Arc<FileItems> {
34 type FileItemsQuery;
35 storage volatile;
36 use fn module::nameres::file_items;
37 }
38
39 fn _file_item(file_id: FileId, file_item_id: FileItemId) -> SyntaxNode {
40 type FileItemQuery;
41 storage volatile;
42 use fn module::nameres::file_item;
43 }
44
31 fn _input_module_items(source_root_id: SourceRootId, module_id: ModuleId) -> Cancelable<Arc<InputModuleItems>> { 45 fn _input_module_items(source_root_id: SourceRootId, module_id: ModuleId) -> Cancelable<Arc<InputModuleItems>> {
32 type InputModuleItemsQuery; 46 type InputModuleItemsQuery;
33 use fn module::nameres::input_module_items; 47 use fn module::nameres::input_module_items;