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).
This commit is contained in:
Aleksey Kladov 2020-10-20 15:38:11 +02:00
parent be762ccccd
commit af4e75533f
11 changed files with 28 additions and 35 deletions

View file

@ -45,7 +45,7 @@ pub(crate) fn status(db: &RootDatabase, file_id: Option<FileId>) -> String {
match krate {
Some(krate) => {
let crate_graph = db.crate_graph();
let display_crate = |krate: CrateId| match &crate_graph[krate].declaration_name {
let display_crate = |krate: CrateId| match &crate_graph[krate].display_name {
Some(it) => format!("{}({:?})", it, krate),
None => format!("{:?}", krate),
};