diff options
author | Aleksey Kladov <[email protected]> | 2020-10-20 14:38:11 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-10-20 14:38:11 +0100 |
commit | af4e75533f2c071330e740e2fa94b131e3a2b538 (patch) | |
tree | 6f517a43814751d8b1ea478b5ed03baf57b4f0b5 /crates/hir_def/src/nameres.rs | |
parent | be762ccccd5a86632e60351518528d078785a3e2 (diff) |
Rename declaration_name -> display_name
Declaration names sounds like a name of declaration -- something you
can use for analysis. It empathically isn't, and is just a label
displayed in various UI. It's important not to confuse the two, least
we accidentally mix semantics with UI (I believe, there's already a
case of this in the FamousDefs at least).
Diffstat (limited to 'crates/hir_def/src/nameres.rs')
-rw-r--r-- | crates/hir_def/src/nameres.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/crates/hir_def/src/nameres.rs b/crates/hir_def/src/nameres.rs index 464ffef21..3d04f81c6 100644 --- a/crates/hir_def/src/nameres.rs +++ b/crates/hir_def/src/nameres.rs | |||
@@ -172,11 +172,7 @@ pub struct ModuleData { | |||
172 | impl CrateDefMap { | 172 | impl CrateDefMap { |
173 | pub(crate) fn crate_def_map_query(db: &dyn DefDatabase, krate: CrateId) -> Arc<CrateDefMap> { | 173 | pub(crate) fn crate_def_map_query(db: &dyn DefDatabase, krate: CrateId) -> Arc<CrateDefMap> { |
174 | let _p = profile::span("crate_def_map_query").detail(|| { | 174 | let _p = profile::span("crate_def_map_query").detail(|| { |
175 | db.crate_graph()[krate] | 175 | db.crate_graph()[krate].display_name.as_deref().unwrap_or_default().to_string() |
176 | .declaration_name | ||
177 | .as_ref() | ||
178 | .map(ToString::to_string) | ||
179 | .unwrap_or_default() | ||
180 | }); | 176 | }); |
181 | let def_map = { | 177 | let def_map = { |
182 | let edition = db.crate_graph()[krate].edition; | 178 | let edition = db.crate_graph()[krate].edition; |