Skip to content

Commit

Permalink
Auto merge of rust-lang#96531 - kckeiks:remove-item-like-visitor-from…
Browse files Browse the repository at this point in the history
…-rustc-typeck, r=cjgillot

Remove ItemLikeVisitor impls from rustc_typeck

Issue rust-lang#95004
cc `@cjgillot`
  • Loading branch information
bors committed May 7, 2022
2 parents 13e8ace + c09778d commit dd6ee7f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions clippy_lints/src/same_name_method.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit dd6ee7f

Please sign in to comment.