2017-02-07 20:05:30 +00:00
|
|
|
error: equal expressions as operands to `==`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/eq_op.rs:7:13
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2022-02-10 17:40:06 +00:00
|
|
|
LL | let _ = 1 == 1;
|
|
|
|
| ^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-08-01 14:30:44 +00:00
|
|
|
= note: `-D clippy::eq-op` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::eq_op)]`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: equal expressions as operands to `==`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/eq_op.rs:10:13
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2022-02-10 17:40:06 +00:00
|
|
|
LL | let _ = "no" == "no";
|
|
|
|
| ^^^^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: equal expressions as operands to `!=`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/eq_op.rs:13:13
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2022-02-10 17:40:06 +00:00
|
|
|
LL | let _ = false != false;
|
|
|
|
| ^^^^^^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: equal expressions as operands to `<`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/eq_op.rs:15:13
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2022-02-10 17:40:06 +00:00
|
|
|
LL | let _ = 1.5 < 1.5;
|
|
|
|
| ^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: equal expressions as operands to `>=`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/eq_op.rs:17:13
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2022-02-10 17:40:06 +00:00
|
|
|
LL | let _ = 1u64 >= 1u64;
|
|
|
|
| ^^^^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
2023-07-02 12:35:19 +00:00
|
|
|
error: equal expressions as operands to `!=`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/eq_op.rs:20:13
|
2023-07-02 12:35:19 +00:00
|
|
|
|
|
|
|
|
LL | let _ = x != x;
|
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
|
= note: if you intended to check if the operand is NaN, use `.is_nan()` instead
|
|
|
|
|
2017-02-07 20:05:30 +00:00
|
|
|
error: equal expressions as operands to `&`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/eq_op.rs:25:13
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2022-02-10 17:40:06 +00:00
|
|
|
LL | let _ = (1u32 as u64) & (1u32 as u64);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: equal expressions as operands to `^`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/eq_op.rs:29:17
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2022-02-10 17:40:06 +00:00
|
|
|
LL | let _ = 1 ^ ((((((1))))));
|
|
|
|
| ^^^^^^^^^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: equal expressions as operands to `<`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/eq_op.rs:34:13
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2022-02-10 17:40:06 +00:00
|
|
|
LL | let _ = (-(2) < -(2));
|
|
|
|
| ^^^^^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: equal expressions as operands to `==`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/eq_op.rs:36:13
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2022-02-10 17:40:06 +00:00
|
|
|
LL | let _ = ((1 + 1) & (1 + 1) == (1 + 1) & (1 + 1));
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: equal expressions as operands to `&`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/eq_op.rs:36:14
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2022-02-10 17:40:06 +00:00
|
|
|
LL | let _ = ((1 + 1) & (1 + 1) == (1 + 1) & (1 + 1));
|
|
|
|
| ^^^^^^^^^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: equal expressions as operands to `&`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/eq_op.rs:36:35
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2022-02-10 17:40:06 +00:00
|
|
|
LL | let _ = ((1 + 1) & (1 + 1) == (1 + 1) & (1 + 1));
|
|
|
|
| ^^^^^^^^^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: equal expressions as operands to `==`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/eq_op.rs:40:13
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2022-02-10 17:40:06 +00:00
|
|
|
LL | let _ = (1 * 2) + (3 * 4) == 1 * 2 + 3 * 4;
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: equal expressions as operands to `!=`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/eq_op.rs:44:13
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2022-02-10 17:40:06 +00:00
|
|
|
LL | let _ = ([1] != [1]);
|
|
|
|
| ^^^^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: equal expressions as operands to `!=`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/eq_op.rs:46:13
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2022-02-10 17:40:06 +00:00
|
|
|
LL | let _ = ((1, 2) != (1, 2));
|
|
|
|
| ^^^^^^^^^^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: equal expressions as operands to `==`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/eq_op.rs:51:13
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2022-02-10 17:40:06 +00:00
|
|
|
LL | let _ = 1 + 1 == 2;
|
|
|
|
| ^^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: equal expressions as operands to `==`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/eq_op.rs:53:13
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2022-02-10 17:40:06 +00:00
|
|
|
LL | let _ = 1 - 1 == 0;
|
|
|
|
| ^^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: equal expressions as operands to `-`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/eq_op.rs:53:13
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2022-02-10 17:40:06 +00:00
|
|
|
LL | let _ = 1 - 1 == 0;
|
|
|
|
| ^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: equal expressions as operands to `-`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/eq_op.rs:57:13
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2022-02-10 17:40:06 +00:00
|
|
|
LL | let _ = 1 - 1;
|
|
|
|
| ^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: equal expressions as operands to `/`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/eq_op.rs:59:13
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2022-02-10 17:40:06 +00:00
|
|
|
LL | let _ = 1 / 1;
|
|
|
|
| ^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: equal expressions as operands to `&&`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/eq_op.rs:61:13
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2022-02-10 17:40:06 +00:00
|
|
|
LL | let _ = true && true;
|
|
|
|
| ^^^^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: equal expressions as operands to `||`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/eq_op.rs:64:13
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2022-02-10 17:40:06 +00:00
|
|
|
LL | let _ = true || true;
|
|
|
|
| ^^^^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: equal expressions as operands to `&&`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/eq_op.rs:70:13
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2022-02-10 17:40:06 +00:00
|
|
|
LL | let _ = a == b && b == a;
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: equal expressions as operands to `&&`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/eq_op.rs:72:13
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2022-02-10 17:40:06 +00:00
|
|
|
LL | let _ = a != b && b != a;
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: equal expressions as operands to `&&`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/eq_op.rs:74:13
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2022-02-10 17:40:06 +00:00
|
|
|
LL | let _ = a < b && b > a;
|
|
|
|
| ^^^^^^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: equal expressions as operands to `&&`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/eq_op.rs:76:13
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2022-02-10 17:40:06 +00:00
|
|
|
LL | let _ = a <= b && b >= a;
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: equal expressions as operands to `==`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/eq_op.rs:80:13
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2022-02-10 17:40:06 +00:00
|
|
|
LL | let _ = a == a;
|
|
|
|
| ^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
2018-03-23 18:26:52 +00:00
|
|
|
error: equal expressions as operands to `/`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/eq_op.rs:91:20
|
2018-12-27 15:57:55 +00:00
|
|
|
|
|
|
|
|
LL | const D: u32 = A / A;
|
|
|
|
| ^^^^^
|
2018-03-23 18:26:52 +00:00
|
|
|
|
2020-12-06 14:01:03 +00:00
|
|
|
error: equal expressions as operands to `==`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/eq_op.rs:123:5
|
2020-12-06 14:01:03 +00:00
|
|
|
|
|
|
|
|
LL | (n1.inner.0).0 == (n1.inner.0).0 && (n1.inner.1).0 == (n2.inner.1).0 && (n1.inner.2).0 == (n2.inner.2).0
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
2023-07-02 12:35:19 +00:00
|
|
|
error: aborting due to 29 previous errors
|
2018-01-16 16:06:27 +00:00
|
|
|
|