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
|
@ -159,10 +159,7 @@ fn check_trait_items(cx: &LateContext<'_>, visited_trait: &Item<'_>, trait_items
|
|||
fn is_named_self(cx: &LateContext<'_>, item: &TraitItemRef, name: &str) -> bool {
|
||||
item.ident.name.as_str() == name
|
||||
&& if let AssocItemKind::Fn { has_self } = item.kind {
|
||||
has_self && {
|
||||
let did = cx.tcx.hir().local_def_id(item.id.hir_id);
|
||||
cx.tcx.fn_sig(did).inputs().skip_binder().len() == 1
|
||||
}
|
||||
has_self && { cx.tcx.fn_sig(item.id.def_id).inputs().skip_binder().len() == 1 }
|
||||
} else {
|
||||
false
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue