mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 05:33:27 +00:00
161 lines
7 KiB
Text
161 lines
7 KiB
Text
error: this sequence of operators looks suspiciously like a bug
|
|
--> tests/ui/suspicious_operation_groupings.rs:17:9
|
|
|
|
|
LL | self.x == other.y && self.y == other.y && self.z == other.z
|
|
| ^^^^^^^^^^^^^^^^^ help: did you mean: `self.x == other.x`
|
|
|
|
|
= note: `-D clippy::suspicious-operation-groupings` implied by `-D warnings`
|
|
= help: to override `-D warnings` add `#[allow(clippy::suspicious_operation_groupings)]`
|
|
|
|
error: this sequence of operators looks suspiciously like a bug
|
|
--> tests/ui/suspicious_operation_groupings.rs:30:20
|
|
|
|
|
LL | s1.a < s2.a && s1.a < s2.b
|
|
| ^^^^^^^^^^^ help: did you mean: `s1.b < s2.b`
|
|
|
|
error: this sequence of operators looks suspiciously like a bug
|
|
--> tests/ui/suspicious_operation_groupings.rs:78:33
|
|
|
|
|
LL | s1.a * s2.a + s1.b * s2.b + s1.c * s2.b + s1.d * s2.d
|
|
| ^^^^^^^^^^^ help: did you mean: `s1.c * s2.c`
|
|
|
|
error: this sequence of operators looks suspiciously like a bug
|
|
--> tests/ui/suspicious_operation_groupings.rs:83:19
|
|
|
|
|
LL | s1.a * s2.a + s1.b * s2.c + s1.c * s2.c
|
|
| ^^^^^^^^^^^ help: did you mean: `s1.b * s2.b`
|
|
|
|
error: this sequence of operators looks suspiciously like a bug
|
|
--> tests/ui/suspicious_operation_groupings.rs:83:19
|
|
|
|
|
LL | s1.a * s2.a + s1.b * s2.c + s1.c * s2.c
|
|
| ^^^^^^^^^^^ help: did you mean: `s1.b * s2.b`
|
|
|
|
error: this sequence of operators looks suspiciously like a bug
|
|
--> tests/ui/suspicious_operation_groupings.rs:88:19
|
|
|
|
|
LL | s1.a * s2.a + s2.b * s2.b + s1.c * s2.c
|
|
| ^^^^^^^^^^^ help: did you mean: `s1.b * s2.b`
|
|
|
|
error: this sequence of operators looks suspiciously like a bug
|
|
--> tests/ui/suspicious_operation_groupings.rs:93:19
|
|
|
|
|
LL | s1.a * s2.a + s1.b * s1.b + s1.c * s2.c
|
|
| ^^^^^^^^^^^ help: did you mean: `s1.b * s2.b`
|
|
|
|
error: this sequence of operators looks suspiciously like a bug
|
|
--> tests/ui/suspicious_operation_groupings.rs:98:5
|
|
|
|
|
LL | s1.a * s1.a + s1.b * s2.b + s1.c * s2.c
|
|
| ^^^^^^^^^^^ help: did you mean: `s1.a * s2.a`
|
|
|
|
error: this sequence of operators looks suspiciously like a bug
|
|
--> tests/ui/suspicious_operation_groupings.rs:103:33
|
|
|
|
|
LL | s1.a * s2.a + s1.b * s2.b + s1.c * s1.c
|
|
| ^^^^^^^^^^^ help: did you mean: `s1.c * s2.c`
|
|
|
|
error: this sequence of operators looks suspiciously like a bug
|
|
--> tests/ui/suspicious_operation_groupings.rs:116:20
|
|
|
|
|
LL | (s1.a * s2.a + s1.b * s1.b)
|
|
| ^^^^^^^^^^^ help: did you mean: `s1.b * s2.b`
|
|
|
|
error: this sequence of operators looks suspiciously like a bug
|
|
--> tests/ui/suspicious_operation_groupings.rs:121:34
|
|
|
|
|
LL | (s1.a * s2.a + s1.b * s2.b + s1.c * s2.b + s1.d * s2.d)
|
|
| ^^^^^^^^^^^ help: did you mean: `s1.c * s2.c`
|
|
|
|
error: this sequence of operators looks suspiciously like a bug
|
|
--> tests/ui/suspicious_operation_groupings.rs:126:38
|
|
|
|
|
LL | (s1.a * s2.a) + (s1.b * s2.b) + (s1.c * s2.b) + (s1.d * s2.d)
|
|
| ^^^^^^^^^^^ help: did you mean: `s1.c * s2.c`
|
|
|
|
error: this sequence of operators looks suspiciously like a bug
|
|
--> tests/ui/suspicious_operation_groupings.rs:131:39
|
|
|
|
|
LL | ((s1.a * s2.a) + (s1.b * s2.b) + (s1.c * s2.b) + (s1.d * s2.d))
|
|
| ^^^^^^^^^^^ help: did you mean: `s1.c * s2.c`
|
|
|
|
error: this sequence of operators looks suspiciously like a bug
|
|
--> tests/ui/suspicious_operation_groupings.rs:136:42
|
|
|
|
|
LL | (((s1.a * s2.a) + (s1.b * s2.b)) + ((s1.c * s2.b) + (s1.d * s2.d)))
|
|
| ^^^^^^^^^^^ help: did you mean: `s1.c * s2.c`
|
|
|
|
error: this sequence of operators looks suspiciously like a bug
|
|
--> tests/ui/suspicious_operation_groupings.rs:136:42
|
|
|
|
|
LL | (((s1.a * s2.a) + (s1.b * s2.b)) + ((s1.c * s2.b) + (s1.d * s2.d)))
|
|
| ^^^^^^^^^^^ help: did you mean: `s1.c * s2.c`
|
|
|
|
error: this sequence of operators looks suspiciously like a bug
|
|
--> tests/ui/suspicious_operation_groupings.rs:141:40
|
|
|
|
|
LL | (((s1.a * s2.a) + (s1.b * s2.b) + (s1.c * s2.b)) + (s1.d * s2.d))
|
|
| ^^^^^^^^^^^ help: did you mean: `s1.c * s2.c`
|
|
|
|
error: this sequence of operators looks suspiciously like a bug
|
|
--> tests/ui/suspicious_operation_groupings.rs:146:40
|
|
|
|
|
LL | ((s1.a * s2.a) + ((s1.b * s2.b) + (s1.c * s2.b) + (s1.d * s2.d)))
|
|
| ^^^^^^^^^^^ help: did you mean: `s1.c * s2.c`
|
|
|
|
error: this sequence of operators looks suspiciously like a bug
|
|
--> tests/ui/suspicious_operation_groupings.rs:151:20
|
|
|
|
|
LL | (s1.a * s2.a + s2.b * s2.b) / 2
|
|
| ^^^^^^^^^^^ help: did you mean: `s1.b * s2.b`
|
|
|
|
error: this sequence of operators looks suspiciously like a bug
|
|
--> tests/ui/suspicious_operation_groupings.rs:156:35
|
|
|
|
|
LL | i32::swap_bytes(s1.a * s2.a + s2.b * s2.b)
|
|
| ^^^^^^^^^^^ help: did you mean: `s1.b * s2.b`
|
|
|
|
error: this sequence of operators looks suspiciously like a bug
|
|
--> tests/ui/suspicious_operation_groupings.rs:161:29
|
|
|
|
|
LL | s1.a > 0 && s1.b > 0 && s1.d == s2.c && s1.d == s2.d
|
|
| ^^^^^^^^^^^^ help: did you mean: `s1.c == s2.c`
|
|
|
|
error: this sequence of operators looks suspiciously like a bug
|
|
--> tests/ui/suspicious_operation_groupings.rs:166:17
|
|
|
|
|
LL | s1.a > 0 && s1.d == s2.c && s1.b > 0 && s1.d == s2.d
|
|
| ^^^^^^^^^^^^ help: did you mean: `s1.c == s2.c`
|
|
|
|
error: this sequence of operators looks suspiciously like a bug
|
|
--> tests/ui/suspicious_operation_groupings.rs:175:77
|
|
|
|
|
LL | (n1.inner.0).0 == (n2.inner.0).0 && (n1.inner.1).0 == (n2.inner.1).0 && (n1.inner.2).0 == (n2.inner.1).0
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: did you mean: `(n1.inner.2).0 == (n2.inner.2).0`
|
|
|
|
error: this sequence of operators looks suspiciously like a bug
|
|
--> tests/ui/suspicious_operation_groupings.rs:189:25
|
|
|
|
|
LL | s1.a <= s2.a && s1.a <= s2.b
|
|
| ^^^^^^^^^^^^ help: did you mean: `s1.b <= s2.b`
|
|
|
|
error: this sequence of operators looks suspiciously like a bug
|
|
--> tests/ui/suspicious_operation_groupings.rs:195:23
|
|
|
|
|
LL | if s1.a < s2.a && s1.a < s2.b {
|
|
| ^^^^^^^^^^^ help: did you mean: `s1.b < s2.b`
|
|
|
|
error: this sequence of operators looks suspiciously like a bug
|
|
--> tests/ui/suspicious_operation_groupings.rs:202:48
|
|
|
|
|
LL | -(-(-s1.a * -s2.a) + (-(-s1.b * -s2.b) + -(-s1.c * -s2.b) + -(-s1.d * -s2.d)))
|
|
| ^^^^^^^^^^^^^ help: did you mean: `-s1.c * -s2.c`
|
|
|
|
error: this sequence of operators looks suspiciously like a bug
|
|
--> tests/ui/suspicious_operation_groupings.rs:207:27
|
|
|
|
|
LL | -(if -s1.a < -s2.a && -s1.a < -s2.b { s1.c } else { s2.a })
|
|
| ^^^^^^^^^^^^^ help: did you mean: `-s1.b < -s2.b`
|
|
|
|
error: aborting due to 26 previous errors
|
|
|