Return a LocalDefId in get_parent_item.
This commit is contained in:
parent
5a123c265b
commit
60064726ae
51 changed files with 151 additions and 140 deletions
|
@ -2024,7 +2024,7 @@ fn visibility(tcx: TyCtxt<'_>, def_id: DefId) -> ty::Visibility {
|
|||
// Visibilities of trait impl items are inherited from their traits
|
||||
// and are not filled in resolve.
|
||||
Node::ImplItem(impl_item) => {
|
||||
match tcx.hir().get(tcx.hir().get_parent_item(hir_id)) {
|
||||
match tcx.hir().get_by_def_id(tcx.hir().get_parent_item(hir_id)) {
|
||||
Node::Item(hir::Item {
|
||||
kind: hir::ItemKind::Impl(hir::Impl { of_trait: Some(tr), .. }),
|
||||
..
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue