Trait impls are Items, therefore HIR owners.

This commit is contained in:
Camille GILLOT 2021-02-01 11:12:49 +01:00
parent f395f2ea12
commit 7dd1e8cfdf
10 changed files with 16 additions and 22 deletions

View file

@ -361,8 +361,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
.hir()
.trait_impls(trait_did)
.iter()
.filter_map(|impl_node| {
let impl_did = tcx.hir().local_def_id(*impl_node);
.filter_map(|&impl_did| {
match tcx.hir().get_if_local(impl_did.to_def_id()) {
Some(Node::Item(Item {
kind: ItemKind::Impl(hir::Impl { self_ty, .. }),