Skip to content

Commit 5622f9a

Browse files
authored
Merge pull request #1942 from Frederick888/fix-1941
Try to fix #1941
2 parents 3cf0fff + 709c792 commit 5622f9a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

clippy_lints/src/derive.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,8 @@ fn check_hash_peq<'a, 'tcx>(
9595
match_path_old(&trait_ref.path, &paths::HASH),
9696
let Some(peq_trait_def_id) = cx.tcx.lang_items.eq_trait()
9797
], {
98-
let peq_trait_def = cx.tcx.trait_def(peq_trait_def_id);
99-
10098
// Look for the PartialEq implementations for `ty`
101-
peq_trait_def.for_each_relevant_impl(cx.tcx, ty, |impl_id| {
99+
cx.tcx.for_each_relevant_impl(peq_trait_def_id, ty, |impl_id| {
102100
let peq_is_automatically_derived = is_automatically_derived(&cx.tcx.get_attrs(impl_id));
103101

104102
if peq_is_automatically_derived == hash_is_automatically_derived {

0 commit comments

Comments
 (0)