Skip to content

Commit 3363a62

Browse files
committed
remove CheckVisitor, CollectExternCrateVisitor and ItemLikeVisitor impls
Signed-off-by: Miguel Guarniz <[email protected]>
1 parent 2249168 commit 3363a62

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

clippy_lints/src/same_name_method.rs

+4
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ impl<'tcx> LateLintPass<'tcx> for SameNameMethod {
5151
let mut map = FxHashMap::<Res, ExistingName>::default();
5252

5353
for id in cx.tcx.hir().items() {
54+
if !matches!(cx.tcx.hir().def_kind(id.def_id), DefKind::Impl) {
55+
continue;
56+
}
57+
5458
let item = cx.tcx.hir().item(id);
5559
if let ItemKind::Impl(Impl {
5660
items,

0 commit comments

Comments
 (0)