We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
from_hir
1 parent 67d0db6 commit f60fd49Copy full SHA for f60fd49
compiler/rustc_middle/src/ty/mod.rs
@@ -2827,11 +2827,9 @@ impl<'tcx> TyCtxt<'tcx> {
2827
pub fn item_name(self, id: DefId) -> Symbol {
2828
// Look at cross-crate items first to avoid invalidating the incremental cache
2829
// unless we have to.
2830
- self.item_name_from_def_id(id)
2831
- .or_else(|| self.item_name_from_hir(id).map(|ident| ident.name))
2832
- .unwrap_or_else(|| {
2833
- bug!("item_name: no name for {:?}", self.def_path(id));
2834
- })
+ self.item_name_from_def_id(id).unwrap_or_else(|| {
+ bug!("item_name: no name for {:?}", self.def_path(id));
+ })
2835
}
2836
2837
/// Look up the name and span of an item or [`Node`].
0 commit comments