mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
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.
This commit is contained in:
parent
d10214581e
commit
fbbee53722
8 changed files with 223 additions and 22 deletions
|
@ -9,8 +9,9 @@ use salsa;
|
|||
use crate::{
|
||||
db,
|
||||
Cancelable, Canceled,
|
||||
descriptors::module::{SubmodulesQuery, ModuleTreeQuery, ModulesDatabase},
|
||||
descriptors::module::{SubmodulesQuery, ModuleTreeQuery, ModulesDatabase, ModuleScopeQuery},
|
||||
symbol_index::SymbolIndex,
|
||||
syntax_ptr::{SyntaxPtrDatabase, ResolveSyntaxPtrQuery},
|
||||
FileId,
|
||||
};
|
||||
|
||||
|
@ -65,6 +66,10 @@ salsa::database_storage! {
|
|||
impl ModulesDatabase {
|
||||
fn module_tree() for ModuleTreeQuery;
|
||||
fn module_descriptor() for SubmodulesQuery;
|
||||
fn module_scope() for ModuleScopeQuery;
|
||||
}
|
||||
impl SyntaxPtrDatabase {
|
||||
fn resolve_syntax_ptr() for ResolveSyntaxPtrQuery;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue