diff options
| author | bors <bors@rust-lang.org> | 2022-05-07 01:59:11 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-05-07 01:59:11 +0000 |
| commit | dd6ee7f2b4d476119f183641acdf955889dc0d5f (patch) | |
| tree | 85f80b3f39632172549916dc6953dfff9b127956 | |
| parent | 13e8ace73c45a15e07e8e9b14f108b8691bb77b7 (diff) | |
| parent | c09778dd21771eee53c32f53a570c53757d46ca2 (diff) | |
| download | rust-dd6ee7f2b4d476119f183641acdf955889dc0d5f.tar.gz rust-dd6ee7f2b4d476119f183641acdf955889dc0d5f.zip | |
Auto merge of #96531 - kckeiks:remove-item-like-visitor-from-rustc-typeck, r=cjgillot
Remove ItemLikeVisitor impls from rustc_typeck Issue #95004 cc `@cjgillot`
| -rw-r--r-- | clippy_lints/src/same_name_method.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/clippy_lints/src/same_name_method.rs b/clippy_lints/src/same_name_method.rs index f63925a2f14..c5c174cc8f6 100644 --- a/clippy_lints/src/same_name_method.rs +++ b/clippy_lints/src/same_name_method.rs @@ -51,14 +51,14 @@ impl<'tcx> LateLintPass<'tcx> for SameNameMethod { let mut map = FxHashMap::<Res, ExistingName>::default(); for id in cx.tcx.hir().items() { - if matches!(cx.tcx.hir().def_kind(id.def_id), DefKind::Impl) + if matches!(cx.tcx.def_kind(id.def_id), DefKind::Impl) && let item = cx.tcx.hir().item(id) && let ItemKind::Impl(Impl { - items, - of_trait, - self_ty, - .. - }) = &item.kind + items, + of_trait, + self_ty, + .. + }) = &item.kind && let TyKind::Path(QPath::Resolved(_, Path { res, .. })) = self_ty.kind { if !map.contains_key(res) { |
