diff options
Diffstat (limited to 'crates/ra_hir_def/src')
-rw-r--r-- | crates/ra_hir_def/src/nameres.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/crates/ra_hir_def/src/nameres.rs b/crates/ra_hir_def/src/nameres.rs index 81eac52ad..87992854a 100644 --- a/crates/ra_hir_def/src/nameres.rs +++ b/crates/ra_hir_def/src/nameres.rs | |||
@@ -177,8 +177,13 @@ pub struct ModuleData { | |||
177 | 177 | ||
178 | impl CrateDefMap { | 178 | impl CrateDefMap { |
179 | pub(crate) fn crate_def_map_query(db: &impl DefDatabase, krate: CrateId) -> Arc<CrateDefMap> { | 179 | pub(crate) fn crate_def_map_query(db: &impl DefDatabase, krate: CrateId) -> Arc<CrateDefMap> { |
180 | let _p = profile("crate_def_map_query") | 180 | let _p = profile("crate_def_map_query").detail(|| { |
181 | .detail(|| db.crate_graph()[krate].display_name.clone().unwrap_or_default()); | 181 | db.crate_graph()[krate] |
182 | .display_name | ||
183 | .as_ref() | ||
184 | .map(|name| name.get_name()) | ||
185 | .unwrap_or_default() | ||
186 | }); | ||
182 | let def_map = { | 187 | let def_map = { |
183 | let edition = db.crate_graph()[krate].edition; | 188 | let edition = db.crate_graph()[krate].edition; |
184 | let mut modules: Arena<LocalModuleId, ModuleData> = Arena::default(); | 189 | let mut modules: Arena<LocalModuleId, ModuleData> = Arena::default(); |