Only store a LocalDefId in hir::TraitItem.
This commit is contained in:
parent
2dc65397ee
commit
fc9bc33bba
9 changed files with 15 additions and 19 deletions
|
|
@ -87,11 +87,11 @@ impl<'tcx> LateLintPass<'tcx> for BoxedLocal {
|
|||
// find `self` ty for this trait if relevant
|
||||
if let ItemKind::Trait(_, _, _, _, items) = item.kind {
|
||||
for trait_item in items {
|
||||
if trait_item.id.hir_id == hir_id {
|
||||
if trait_item.id.hir_id() == hir_id {
|
||||
// be sure we have `self` parameter in this function
|
||||
if let AssocItemKind::Fn { has_self: true } = trait_item.kind {
|
||||
trait_self_ty =
|
||||
Some(TraitRef::identity(cx.tcx, trait_item.id.hir_id.owner.to_def_id()).self_ty());
|
||||
Some(TraitRef::identity(cx.tcx, trait_item.id.def_id.to_def_id()).self_ty());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue