We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 13e8ace + c09778d commit dd6ee7fCopy full SHA for dd6ee7f
clippy_lints/src/same_name_method.rs
@@ -51,14 +51,14 @@ impl<'tcx> LateLintPass<'tcx> for SameNameMethod {
51
let mut map = FxHashMap::<Res, ExistingName>::default();
52
53
for id in cx.tcx.hir().items() {
54
- if matches!(cx.tcx.hir().def_kind(id.def_id), DefKind::Impl)
+ if matches!(cx.tcx.def_kind(id.def_id), DefKind::Impl)
55
&& let item = cx.tcx.hir().item(id)
56
&& let ItemKind::Impl(Impl {
57
- items,
58
- of_trait,
59
- self_ty,
60
- ..
61
- }) = &item.kind
+ items,
+ of_trait,
+ self_ty,
+ ..
+ }) = &item.kind
62
&& let TyKind::Path(QPath::Resolved(_, Path { res, .. })) = self_ty.kind
63
{
64
if !map.contains_key(res) {
0 commit comments