2 Checks for unlikely usages of binary operators that are almost
3 certainly typos and/or copy/paste errors, given the other usages
4 of binary operators nearby.
7 They are probably bugs and if they aren't then they look like bugs
8 and you should add a comment explaining why you are doing such an
12 There may be some false positives if you are trying to do something
13 unusual that happens to look like a typo.
25 impl PartialEq for Vec3 {
26 fn eq(&self, other: &Self) -> bool {
27 // This should trigger the lint because `self.x` is compared to `other.y`
28 self.x == other.y && self.y == other.y && self.z == other.z
34 // same as above except:
35 impl PartialEq for Vec3 {
36 fn eq(&self, other: &Self) -> bool {
37 // Note we now compare other.x to self.x
38 self.x == other.x && self.y == other.y && self.z == other.z