diff options
author | Aleksey Kladov <[email protected]> | 2018-10-30 23:08:54 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-10-30 23:08:54 +0000 |
commit | fbbee537228538f448a335bb0b2dabec2b3d443e (patch) | |
tree | db676e2c84585c13179e0116b018a3e67b550190 /crates/ra_analysis/src/db.rs | |
parent | d10214581e18a3c98760ecf8ebbd27aaf48ec9ae (diff) |
Add ModuleScope as a query
This is a first step towards queryifing completion and resolve.
Some code currently duplicates ra_editor: the plan is to move all
completion from ra_editor, but it'll take more than one commit.
Diffstat (limited to 'crates/ra_analysis/src/db.rs')
-rw-r--r-- | crates/ra_analysis/src/db.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/crates/ra_analysis/src/db.rs b/crates/ra_analysis/src/db.rs index 3ca14af79..e7a5d5e2f 100644 --- a/crates/ra_analysis/src/db.rs +++ b/crates/ra_analysis/src/db.rs | |||
@@ -9,8 +9,9 @@ use salsa; | |||
9 | use crate::{ | 9 | use crate::{ |
10 | db, | 10 | db, |
11 | Cancelable, Canceled, | 11 | Cancelable, Canceled, |
12 | descriptors::module::{SubmodulesQuery, ModuleTreeQuery, ModulesDatabase}, | 12 | descriptors::module::{SubmodulesQuery, ModuleTreeQuery, ModulesDatabase, ModuleScopeQuery}, |
13 | symbol_index::SymbolIndex, | 13 | symbol_index::SymbolIndex, |
14 | syntax_ptr::{SyntaxPtrDatabase, ResolveSyntaxPtrQuery}, | ||
14 | FileId, | 15 | FileId, |
15 | }; | 16 | }; |
16 | 17 | ||
@@ -65,6 +66,10 @@ salsa::database_storage! { | |||
65 | impl ModulesDatabase { | 66 | impl ModulesDatabase { |
66 | fn module_tree() for ModuleTreeQuery; | 67 | fn module_tree() for ModuleTreeQuery; |
67 | fn module_descriptor() for SubmodulesQuery; | 68 | fn module_descriptor() for SubmodulesQuery; |
69 | fn module_scope() for ModuleScopeQuery; | ||
70 | } | ||
71 | impl SyntaxPtrDatabase { | ||
72 | fn resolve_syntax_ptr() for ResolveSyntaxPtrQuery; | ||
68 | } | 73 | } |
69 | } | 74 | } |
70 | } | 75 | } |