mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-11-13 17:35:21 +00:00
Remove all upcasts!
It turns out there were a lot redundant too.
This commit is contained in:
parent
a775d21112
commit
8a9a1e3345
80 changed files with 1009 additions and 1257 deletions
|
|
@ -640,7 +640,7 @@ impl GeneralConstId {
|
|||
GeneralConstId::StaticId(it) => {
|
||||
let loc = it.lookup(db);
|
||||
let tree = loc.item_tree_id().item_tree(db);
|
||||
let name = tree[loc.id.value].name.display(db.upcast(), Edition::CURRENT);
|
||||
let name = tree[loc.id.value].name.display(db, Edition::CURRENT);
|
||||
name.to_string()
|
||||
}
|
||||
GeneralConstId::ConstId(const_id) => {
|
||||
|
|
@ -648,7 +648,7 @@ impl GeneralConstId {
|
|||
let tree = loc.item_tree_id().item_tree(db);
|
||||
tree[loc.id.value].name.as_ref().map_or_else(
|
||||
|| "_".to_owned(),
|
||||
|name| name.display(db.upcast(), Edition::CURRENT).to_string(),
|
||||
|name| name.display(db, Edition::CURRENT).to_string(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue