Obtain ModuleId's DefMap through a method

This commit is contained in:
Jonas Schievink 2021-01-22 16:31:40 +01:00
parent a5322e3d5b
commit ce29730bc7
14 changed files with 43 additions and 32 deletions

View file

@ -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)
}