remove lower module

This commit is contained in:
Aleksey Kladov 2019-03-14 13:14:54 +03:00
parent c7259a899c
commit b2a6c17362
12 changed files with 48 additions and 264 deletions

View file

@ -186,11 +186,11 @@ impl Module {
}
pub fn declarations(self, db: &impl HirDatabase) -> Vec<ModuleDef> {
let lowered_module = db.lower_module(self);
lowered_module
.declarations
.values()
.cloned()
let def_map = db.crate_def_map(self.krate);
def_map[self.module_id]
.scope
.entries()
.filter_map(|(_name, res)| if res.import.is_none() { Some(res.def) } else { None })
.flat_map(|per_ns| {
per_ns.take_types().into_iter().chain(per_ns.take_values().into_iter())
})