Skip to content

Commit 06b82ab

Browse files
committed
review comments
1 parent 923c122 commit 06b82ab

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

compiler/rustc_middle/src/ty/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1575,7 +1575,7 @@ impl<'tcx> TyCtxt<'tcx> {
15751575
.filter(|item| item.kind == AssocKind::Fn && item.defaultness.has_value())
15761576
}
15771577

1578-
pub fn item_name_from_hir(self, def_id: DefId) -> Option<Ident> {
1578+
fn item_name_from_hir(self, def_id: DefId) -> Option<Ident> {
15791579
self.hir().get_if_local(def_id).and_then(|node| node.ident())
15801580
}
15811581

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

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

0 commit comments

Comments
 (0)