mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
Introduce ModuleId
Previously, module was synonym with a file, and so a module could have had several parents. This commit introduces a separate module concept, such that each module has only one parent, but a single file can correspond to different modules.
This commit is contained in:
parent
1d574ed654
commit
dc477db757
10 changed files with 493 additions and 443 deletions
|
@ -12,7 +12,7 @@ use salsa;
|
|||
use crate::{
|
||||
db,
|
||||
Cancelable, Canceled,
|
||||
module_map::{ModuleDescriptorQuery, ModuleTreeQuery, ModulesDatabase},
|
||||
descriptors::module::{SubmodulesQuery, ModuleTreeQuery, ModulesDatabase},
|
||||
symbol_index::SymbolIndex,
|
||||
FileId, FileResolverImp,
|
||||
};
|
||||
|
@ -69,7 +69,7 @@ salsa::database_storage! {
|
|||
}
|
||||
impl ModulesDatabase {
|
||||
fn module_tree() for ModuleTreeQuery;
|
||||
fn module_descriptor() for ModuleDescriptorQuery;
|
||||
fn module_descriptor() for SubmodulesQuery;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue