Skip to content

Commit f60fd49

Browse files
committedNov 7, 2020
Remove unused from_hir call
1 parent 67d0db6 commit f60fd49

File tree

1 file changed

+3
-5
lines changed
  • compiler/rustc_middle/src/ty

1 file changed

+3
-5
lines changed
 

‎compiler/rustc_middle/src/ty/mod.rs

+3-5
Original file line numberDiff line numberDiff line change
@@ -2827,11 +2827,9 @@ impl<'tcx> TyCtxt<'tcx> {
28272827
pub fn item_name(self, id: DefId) -> Symbol {
28282828
// Look at cross-crate items first to avoid invalidating the incremental cache
28292829
// 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-
})
2830+
self.item_name_from_def_id(id).unwrap_or_else(|| {
2831+
bug!("item_name: no name for {:?}", self.def_path(id));
2832+
})
28352833
}
28362834

28372835
/// Look up the name and span of an item or [`Node`].

0 commit comments

Comments
 (0)
Please sign in to comment.