Remove unused from_hir call
This commit is contained in:
@@ -2827,9 +2827,7 @@ impl<'tcx> TyCtxt<'tcx> {
|
|||||||
pub fn item_name(self, id: DefId) -> Symbol {
|
pub fn item_name(self, id: DefId) -> Symbol {
|
||||||
// Look at cross-crate items first to avoid invalidating the incremental cache
|
// Look at cross-crate items first to avoid invalidating the incremental cache
|
||||||
// unless we have to.
|
// unless we have to.
|
||||||
self.item_name_from_def_id(id)
|
self.item_name_from_def_id(id).unwrap_or_else(|| {
|
||||||
.or_else(|| self.item_name_from_hir(id).map(|ident| ident.name))
|
|
||||||
.unwrap_or_else(|| {
|
|
||||||
bug!("item_name: no name for {:?}", self.def_path(id));
|
bug!("item_name: no name for {:?}", self.def_path(id));
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user