mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
Obtain ModuleId
's DefMap
through a method
This commit is contained in:
parent
a5322e3d5b
commit
ce29730bc7
14 changed files with 43 additions and 32 deletions
|
@ -74,7 +74,7 @@ impl ChildBySource for ImplId {
|
|||
|
||||
impl ChildBySource for ModuleId {
|
||||
fn child_by_source(&self, db: &dyn DefDatabase) -> DynMap {
|
||||
let crate_def_map = db.crate_def_map(self.krate);
|
||||
let crate_def_map = self.def_map(db);
|
||||
let module_data = &crate_def_map[self.local_id];
|
||||
module_data.scope.child_by_source(db)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue