Remove all upcasts!

It turns out there were a lot redundant too.
This commit is contained in:
Chayim Refael Friedman 2025-04-10 11:08:38 +03:00
parent a775d21112
commit 8a9a1e3345
80 changed files with 1009 additions and 1257 deletions

View file

@ -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(),
)
}
}