Trait impls are Items, therefore HIR owners.
This commit is contained in:
parent
f395f2ea12
commit
7dd1e8cfdf
10 changed files with 16 additions and 22 deletions
|
@ -38,8 +38,7 @@ impl<'tcx> Checker<'tcx> {
|
|||
F: FnMut(TyCtxt<'tcx>, LocalDefId),
|
||||
{
|
||||
if Some(self.trait_def_id) == trait_def_id {
|
||||
for &impl_id in self.tcx.hir().trait_impls(self.trait_def_id) {
|
||||
let impl_def_id = self.tcx.hir().local_def_id(impl_id);
|
||||
for &impl_def_id in self.tcx.hir().trait_impls(self.trait_def_id) {
|
||||
f(self.tcx, impl_def_id);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -172,8 +172,7 @@ fn coherent_trait(tcx: TyCtxt<'_>, def_id: DefId) {
|
|||
tcx.ensure().specialization_graph_of(def_id);
|
||||
|
||||
let impls = tcx.hir().trait_impls(def_id);
|
||||
for &hir_id in impls {
|
||||
let impl_def_id = tcx.hir().local_def_id(hir_id);
|
||||
for &impl_def_id in impls {
|
||||
let trait_ref = tcx.impl_trait_ref(impl_def_id).unwrap();
|
||||
|
||||
check_impl(tcx, impl_def_id, trait_ref);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue