Skip to content

Commit

Permalink
Add of_trait to DefKind::Impl.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjgillot committed Feb 14, 2023
1 parent 42d4bd7 commit e41c373
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion clippy_lints/src/same_name_method.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ impl<'tcx> LateLintPass<'tcx> for SameNameMethod {
let mut map = FxHashMap::<Res, ExistingName>::default();

for id in cx.tcx.hir().items() {
if matches!(cx.tcx.def_kind(id.owner_id), DefKind::Impl)
if matches!(cx.tcx.def_kind(id.owner_id), DefKind::Impl { .. })
&& let item = cx.tcx.hir().item(id)
&& let ItemKind::Impl(Impl {
items,
Expand Down
2 changes: 1 addition & 1 deletion clippy_utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ fn non_local_item_children_by_name(tcx: TyCtxt<'_>, def_id: DefId, name: Symbol)
.filter(|item| item.ident.name == name)
.map(|child| child.res.expect_non_local())
.collect(),
DefKind::Impl => tcx
DefKind::Impl { .. } => tcx
.associated_item_def_ids(def_id)
.iter()
.copied()
Expand Down

0 comments on commit e41c373

Please sign in to comment.