We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3cf0fff + 709c792 commit 5622f9aCopy full SHA for 5622f9a
clippy_lints/src/derive.rs
@@ -95,10 +95,8 @@ fn check_hash_peq<'a, 'tcx>(
95
match_path_old(&trait_ref.path, &paths::HASH),
96
let Some(peq_trait_def_id) = cx.tcx.lang_items.eq_trait()
97
], {
98
- let peq_trait_def = cx.tcx.trait_def(peq_trait_def_id);
99
-
100
// Look for the PartialEq implementations for `ty`
101
- peq_trait_def.for_each_relevant_impl(cx.tcx, ty, |impl_id| {
+ cx.tcx.for_each_relevant_impl(peq_trait_def_id, ty, |impl_id| {
102
let peq_is_automatically_derived = is_automatically_derived(&cx.tcx.get_attrs(impl_id));
103
104
if peq_is_automatically_derived == hash_is_automatically_derived {
0 commit comments