diff options
author | Aleksey Kladov <[email protected]> | 2019-03-14 10:14:54 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-03-17 09:52:52 +0000 |
commit | b2a6c1736295a5fffa5ac0d0fee835cdc719ada3 (patch) | |
tree | 56fd27197126f11011fe9030cd9bfb80e142e709 /crates/ra_hir/src/code_model_api.rs | |
parent | c7259a899c1709753dcda0fb117e2f7cc30a4d6e (diff) |
remove lower module
Diffstat (limited to 'crates/ra_hir/src/code_model_api.rs')
-rw-r--r-- | crates/ra_hir/src/code_model_api.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/ra_hir/src/code_model_api.rs b/crates/ra_hir/src/code_model_api.rs index 86c26f1d8..c918ec9f6 100644 --- a/crates/ra_hir/src/code_model_api.rs +++ b/crates/ra_hir/src/code_model_api.rs | |||
@@ -186,11 +186,11 @@ impl Module { | |||
186 | } | 186 | } |
187 | 187 | ||
188 | pub fn declarations(self, db: &impl HirDatabase) -> Vec<ModuleDef> { | 188 | pub fn declarations(self, db: &impl HirDatabase) -> Vec<ModuleDef> { |
189 | let lowered_module = db.lower_module(self); | 189 | let def_map = db.crate_def_map(self.krate); |
190 | lowered_module | 190 | def_map[self.module_id] |
191 | .declarations | 191 | .scope |
192 | .values() | 192 | .entries() |
193 | .cloned() | 193 | .filter_map(|(_name, res)| if res.import.is_none() { Some(res.def) } else { None }) |
194 | .flat_map(|per_ns| { | 194 | .flat_map(|per_ns| { |
195 | per_ns.take_types().into_iter().chain(per_ns.take_values().into_iter()) | 195 | per_ns.take_types().into_iter().chain(per_ns.take_values().into_iter()) |
196 | }) | 196 | }) |