Skip to content

Commit e694ef5

Browse files
committed
Remove the fishy need for a PartialEq impl
1 parent c3c3719 commit e694ef5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

compiler/rustc_hir_typeck/src/method/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
202202
call_expr,
203203
ProbeScope::TraitsInScope,
204204
) {
205-
Ok(ref new_pick) if *new_pick != pick => {
205+
Ok(ref new_pick) if new_pick.self_ty != pick.self_ty => {
206206
needs_mut = true;
207207
}
208208
_ => {}
@@ -213,7 +213,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
213213
let mut candidates =
214214
match self.lookup_probe(segment.ident, self_ty, call_expr, ProbeScope::AllTraits) {
215215
// If we find a different result the caller probably forgot to import a trait.
216-
Ok(ref new_pick) if *new_pick != pick => {
216+
Ok(ref new_pick) if new_pick.self_ty != pick.self_ty => {
217217
vec![new_pick.item.container_id(self.tcx)]
218218
}
219219
Err(Ambiguity(ref sources)) => sources

compiler/rustc_hir_typeck/src/method/probe.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ impl AutorefOrPtrAdjustment {
193193
}
194194
}
195195

196-
#[derive(Debug, PartialEq, Clone)]
196+
#[derive(Debug, Clone)]
197197
pub struct Pick<'tcx> {
198198
pub item: ty::AssocItem,
199199
pub kind: PickKind<'tcx>,

0 commit comments

Comments
 (0)