Take a LocalDefId in expect_*item.
This commit is contained in:
parent
3c8b644d0d
commit
56533d9e87
5 changed files with 6 additions and 12 deletions
|
|
@ -1939,7 +1939,7 @@ impl<'tcx> LateLintPass<'tcx> for Methods {
|
|||
return;
|
||||
}
|
||||
let name = impl_item.ident.name.as_str();
|
||||
let parent = cx.tcx.hir().get_parent_item(impl_item.hir_id());
|
||||
let parent = cx.tcx.hir().get_parent_did(impl_item.hir_id());
|
||||
let item = cx.tcx.hir().expect_item(parent);
|
||||
let self_ty = cx.tcx.type_of(item.def_id);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue