Create all ModuleIds through a DefMap method
`ModuleId` needs to be able to represent blocks, and only the associated `DefMap` will know how to construct that `ModuleId`
This commit is contained in:
@@ -78,10 +78,6 @@ pub struct ModuleId {
|
||||
}
|
||||
|
||||
impl ModuleId {
|
||||
pub fn top_level(krate: CrateId, local_id: LocalModuleId) -> Self {
|
||||
Self { krate, local_id }
|
||||
}
|
||||
|
||||
pub fn def_map(&self, db: &dyn db::DefDatabase) -> Arc<DefMap> {
|
||||
db.crate_def_map(self.krate)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user