mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 05:33:27 +00:00
214 lines
4.7 KiB
Text
214 lines
4.7 KiB
Text
error: this boolean expression can be simplified
|
|
--> $DIR/eq_op.rs:44:5
|
|
|
|
|
LL | true && true;
|
|
| ^^^^^^^^^^^^ help: try: `true`
|
|
|
|
|
= note: `-D clippy::nonminimal-bool` implied by `-D warnings`
|
|
|
|
error: this boolean expression can be simplified
|
|
--> $DIR/eq_op.rs:46:5
|
|
|
|
|
LL | true || true;
|
|
| ^^^^^^^^^^^^ help: try: `true`
|
|
|
|
error: this boolean expression can be simplified
|
|
--> $DIR/eq_op.rs:52:5
|
|
|
|
|
LL | a == b && b == a;
|
|
| ^^^^^^^^^^^^^^^^ help: try: `a == b`
|
|
|
|
error: this boolean expression can be simplified
|
|
--> $DIR/eq_op.rs:53:5
|
|
|
|
|
LL | a != b && b != a;
|
|
| ^^^^^^^^^^^^^^^^ help: try: `a != b`
|
|
|
|
error: this boolean expression can be simplified
|
|
--> $DIR/eq_op.rs:54:5
|
|
|
|
|
LL | a < b && b > a;
|
|
| ^^^^^^^^^^^^^^ help: try: `a < b`
|
|
|
|
error: this boolean expression can be simplified
|
|
--> $DIR/eq_op.rs:55:5
|
|
|
|
|
LL | a <= b && b >= a;
|
|
| ^^^^^^^^^^^^^^^^ help: try: `a <= b`
|
|
|
|
error: equal expressions as operands to `==`
|
|
--> $DIR/eq_op.rs:17:5
|
|
|
|
|
LL | 1 == 1;
|
|
| ^^^^^^
|
|
|
|
|
= note: `-D clippy::eq-op` implied by `-D warnings`
|
|
|
|
error: equal expressions as operands to `==`
|
|
--> $DIR/eq_op.rs:18:5
|
|
|
|
|
LL | "no" == "no";
|
|
| ^^^^^^^^^^^^
|
|
|
|
error: equal expressions as operands to `!=`
|
|
--> $DIR/eq_op.rs:20:5
|
|
|
|
|
LL | false != false;
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
error: equal expressions as operands to `<`
|
|
--> $DIR/eq_op.rs:21:5
|
|
|
|
|
LL | 1.5 < 1.5;
|
|
| ^^^^^^^^^
|
|
|
|
error: equal expressions as operands to `>=`
|
|
--> $DIR/eq_op.rs:22:5
|
|
|
|
|
LL | 1u64 >= 1u64;
|
|
| ^^^^^^^^^^^^
|
|
|
|
error: equal expressions as operands to `&`
|
|
--> $DIR/eq_op.rs:25:5
|
|
|
|
|
LL | (1 as u64) & (1 as u64);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: equal expressions as operands to `^`
|
|
--> $DIR/eq_op.rs:26:5
|
|
|
|
|
LL | 1 ^ ((((((1))))));
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
error: equal expressions as operands to `<`
|
|
--> $DIR/eq_op.rs:29:5
|
|
|
|
|
LL | (-(2) < -(2));
|
|
| ^^^^^^^^^^^^^
|
|
|
|
error: equal expressions as operands to `==`
|
|
--> $DIR/eq_op.rs:30:5
|
|
|
|
|
LL | ((1 + 1) & (1 + 1) == (1 + 1) & (1 + 1));
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: equal expressions as operands to `&`
|
|
--> $DIR/eq_op.rs:30:6
|
|
|
|
|
LL | ((1 + 1) & (1 + 1) == (1 + 1) & (1 + 1));
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
error: equal expressions as operands to `&`
|
|
--> $DIR/eq_op.rs:30:27
|
|
|
|
|
LL | ((1 + 1) & (1 + 1) == (1 + 1) & (1 + 1));
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
error: equal expressions as operands to `==`
|
|
--> $DIR/eq_op.rs:31:5
|
|
|
|
|
LL | (1 * 2) + (3 * 4) == 1 * 2 + 3 * 4;
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: equal expressions as operands to `!=`
|
|
--> $DIR/eq_op.rs:34:5
|
|
|
|
|
LL | ([1] != [1]);
|
|
| ^^^^^^^^^^^^
|
|
|
|
error: equal expressions as operands to `!=`
|
|
--> $DIR/eq_op.rs:35:5
|
|
|
|
|
LL | ((1, 2) != (1, 2));
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
error: equal expressions as operands to `==`
|
|
--> $DIR/eq_op.rs:39:5
|
|
|
|
|
LL | 1 + 1 == 2;
|
|
| ^^^^^^^^^^
|
|
|
|
error: equal expressions as operands to `==`
|
|
--> $DIR/eq_op.rs:40:5
|
|
|
|
|
LL | 1 - 1 == 0;
|
|
| ^^^^^^^^^^
|
|
|
|
error: equal expressions as operands to `-`
|
|
--> $DIR/eq_op.rs:40:5
|
|
|
|
|
LL | 1 - 1 == 0;
|
|
| ^^^^^
|
|
|
|
error: equal expressions as operands to `-`
|
|
--> $DIR/eq_op.rs:42:5
|
|
|
|
|
LL | 1 - 1;
|
|
| ^^^^^
|
|
|
|
error: equal expressions as operands to `/`
|
|
--> $DIR/eq_op.rs:43:5
|
|
|
|
|
LL | 1 / 1;
|
|
| ^^^^^
|
|
|
|
error: equal expressions as operands to `&&`
|
|
--> $DIR/eq_op.rs:44:5
|
|
|
|
|
LL | true && true;
|
|
| ^^^^^^^^^^^^
|
|
|
|
error: equal expressions as operands to `||`
|
|
--> $DIR/eq_op.rs:46:5
|
|
|
|
|
LL | true || true;
|
|
| ^^^^^^^^^^^^
|
|
|
|
error: equal expressions as operands to `&&`
|
|
--> $DIR/eq_op.rs:52:5
|
|
|
|
|
LL | a == b && b == a;
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
error: equal expressions as operands to `&&`
|
|
--> $DIR/eq_op.rs:53:5
|
|
|
|
|
LL | a != b && b != a;
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
error: equal expressions as operands to `&&`
|
|
--> $DIR/eq_op.rs:54:5
|
|
|
|
|
LL | a < b && b > a;
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
error: equal expressions as operands to `&&`
|
|
--> $DIR/eq_op.rs:55:5
|
|
|
|
|
LL | a <= b && b >= a;
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
error: equal expressions as operands to `==`
|
|
--> $DIR/eq_op.rs:58:5
|
|
|
|
|
LL | a == a;
|
|
| ^^^^^^
|
|
|
|
error: taken reference of right operand
|
|
--> $DIR/eq_op.rs:96:13
|
|
|
|
|
LL | let z = x & &y;
|
|
| ^^^^--
|
|
| |
|
|
| help: use the right value directly: `y`
|
|
|
|
|
= note: `-D clippy::op-ref` implied by `-D warnings`
|
|
|
|
error: equal expressions as operands to `/`
|
|
--> $DIR/eq_op.rs:104:20
|
|
|
|
|
LL | const D: u32 = A / A;
|
|
| ^^^^^
|
|
|
|
error: aborting due to 34 previous errors
|
|
|