Skip to content

Commit 2375b8a

Browse files
committed
review comments
1 parent dc71166 commit 2375b8a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

compiler/rustc_middle/src/ty/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1598,7 +1598,7 @@ impl<'tcx> TyCtxt<'tcx> {
15981598
.filter(|item| item.kind == AssocKind::Fn && item.defaultness.has_value())
15991599
}
16001600

1601-
pub fn item_name_from_hir(self, def_id: DefId) -> Option<Ident> {
1601+
fn item_name_from_hir(self, def_id: DefId) -> Option<Ident> {
16021602
self.hir().get_if_local(def_id).and_then(|node| node.ident())
16031603
}
16041604

compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2072,7 +2072,7 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
20722072
if !is_upvar_tys_infer_tuple {
20732073
let msg = format!("required because it appears within the type `{}`", ty);
20742074
match ty.kind() {
2075-
ty::Adt(def, _) => match self.tcx.item_name_from_hir(def.did) {
2075+
ty::Adt(def, _) => match self.tcx.opt_item_name(def.did) {
20762076
Some(ident) => err.span_note(ident.span, &msg),
20772077
None => err.note(&msg),
20782078
},

0 commit comments

Comments
 (0)