217 lines
4.6 KiB
Plaintext
217 lines
4.6 KiB
Plaintext
error: this boolean expression can be simplified
|
|
--> $DIR/eq_op.rs:41:5
|
|
|
|
|
41 | true && true;
|
|
| ^^^^^^^^^^^^ help: try `true`
|
|
|
|
|
note: lint level defined here
|
|
--> $DIR/eq_op.rs:7:8
|
|
|
|
|
7 | #[deny(nonminimal_bool)]
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
error: this boolean expression can be simplified
|
|
--> $DIR/eq_op.rs:43:5
|
|
|
|
|
43 | true || true;
|
|
| ^^^^^^^^^^^^ help: try `true`
|
|
|
|
error: this boolean expression can be simplified
|
|
--> $DIR/eq_op.rs:49:5
|
|
|
|
|
49 | a == b && b == a;
|
|
| ^^^^^^^^^^^^^^^^ help: try `a == b`
|
|
|
|
error: this boolean expression can be simplified
|
|
--> $DIR/eq_op.rs:51:5
|
|
|
|
|
51 | a != b && b != a;
|
|
| ^^^^^^^^^^^^^^^^ help: try `a != b`
|
|
|
|
error: this boolean expression can be simplified
|
|
--> $DIR/eq_op.rs:53:5
|
|
|
|
|
53 | a < b && b > a;
|
|
| ^^^^^^^^^^^^^^ help: try `a < b`
|
|
|
|
error: this boolean expression can be simplified
|
|
--> $DIR/eq_op.rs:55:5
|
|
|
|
|
55 | a <= b && b >= a;
|
|
| ^^^^^^^^^^^^^^^^ help: try `a <= b`
|
|
|
|
error: equal expressions as operands to `==`
|
|
--> $DIR/eq_op.rs:10:5
|
|
|
|
|
10 | 1 == 1;
|
|
| ^^^^^^
|
|
|
|
|
note: lint level defined here
|
|
--> $DIR/eq_op.rs:4:8
|
|
|
|
|
4 | #[deny(eq_op)]
|
|
| ^^^^^
|
|
|
|
error: equal expressions as operands to `==`
|
|
--> $DIR/eq_op.rs:11:5
|
|
|
|
|
11 | "no" == "no";
|
|
| ^^^^^^^^^^^^
|
|
|
|
error: equal expressions as operands to `!=`
|
|
--> $DIR/eq_op.rs:13:5
|
|
|
|
|
13 | false != false;
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
error: equal expressions as operands to `<`
|
|
--> $DIR/eq_op.rs:14:5
|
|
|
|
|
14 | 1.5 < 1.5;
|
|
| ^^^^^^^^^
|
|
|
|
error: equal expressions as operands to `>=`
|
|
--> $DIR/eq_op.rs:15:5
|
|
|
|
|
15 | 1u64 >= 1u64;
|
|
| ^^^^^^^^^^^^
|
|
|
|
error: equal expressions as operands to `&`
|
|
--> $DIR/eq_op.rs:18:5
|
|
|
|
|
18 | (1 as u64) & (1 as u64);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: equal expressions as operands to `^`
|
|
--> $DIR/eq_op.rs:19:5
|
|
|
|
|
19 | 1 ^ ((((((1))))));
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
error: equal expressions as operands to `<`
|
|
--> $DIR/eq_op.rs:22:5
|
|
|
|
|
22 | (-(2) < -(2));
|
|
| ^^^^^^^^^^^^^
|
|
|
|
error: equal expressions as operands to `==`
|
|
--> $DIR/eq_op.rs:23:5
|
|
|
|
|
23 | ((1 + 1) & (1 + 1) == (1 + 1) & (1 + 1));
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: equal expressions as operands to `&`
|
|
--> $DIR/eq_op.rs:23:6
|
|
|
|
|
23 | ((1 + 1) & (1 + 1) == (1 + 1) & (1 + 1));
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
error: equal expressions as operands to `&`
|
|
--> $DIR/eq_op.rs:23:27
|
|
|
|
|
23 | ((1 + 1) & (1 + 1) == (1 + 1) & (1 + 1));
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
error: equal expressions as operands to `==`
|
|
--> $DIR/eq_op.rs:27:5
|
|
|
|
|
27 | (1 * 2) + (3 * 4) == 1 * 2 + 3 * 4;
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: equal expressions as operands to `!=`
|
|
--> $DIR/eq_op.rs:30:5
|
|
|
|
|
30 | ([1] != [1]);
|
|
| ^^^^^^^^^^^^
|
|
|
|
error: equal expressions as operands to `!=`
|
|
--> $DIR/eq_op.rs:31:5
|
|
|
|
|
31 | ((1, 2) != (1, 2));
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
error: equal expressions as operands to `==`
|
|
--> $DIR/eq_op.rs:35:5
|
|
|
|
|
35 | 1 + 1 == 2;
|
|
| ^^^^^^^^^^
|
|
|
|
error: equal expressions as operands to `==`
|
|
--> $DIR/eq_op.rs:36:5
|
|
|
|
|
36 | 1 - 1 == 0;
|
|
| ^^^^^^^^^^
|
|
|
|
error: equal expressions as operands to `-`
|
|
--> $DIR/eq_op.rs:36:5
|
|
|
|
|
36 | 1 - 1 == 0;
|
|
| ^^^^^
|
|
|
|
error: equal expressions as operands to `-`
|
|
--> $DIR/eq_op.rs:39:5
|
|
|
|
|
39 | 1 - 1;
|
|
| ^^^^^
|
|
|
|
error: equal expressions as operands to `/`
|
|
--> $DIR/eq_op.rs:40:5
|
|
|
|
|
40 | 1 / 1;
|
|
| ^^^^^
|
|
|
|
error: equal expressions as operands to `&&`
|
|
--> $DIR/eq_op.rs:41:5
|
|
|
|
|
41 | true && true;
|
|
| ^^^^^^^^^^^^
|
|
|
|
error: equal expressions as operands to `||`
|
|
--> $DIR/eq_op.rs:43:5
|
|
|
|
|
43 | true || true;
|
|
| ^^^^^^^^^^^^
|
|
|
|
error: equal expressions as operands to `&&`
|
|
--> $DIR/eq_op.rs:49:5
|
|
|
|
|
49 | a == b && b == a;
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
error: equal expressions as operands to `&&`
|
|
--> $DIR/eq_op.rs:51:5
|
|
|
|
|
51 | a != b && b != a;
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
error: equal expressions as operands to `&&`
|
|
--> $DIR/eq_op.rs:53:5
|
|
|
|
|
53 | a < b && b > a;
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
error: equal expressions as operands to `&&`
|
|
--> $DIR/eq_op.rs:55:5
|
|
|
|
|
55 | a <= b && b >= a;
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
error: equal expressions as operands to `==`
|
|
--> $DIR/eq_op.rs:59:5
|
|
|
|
|
59 | a == a;
|
|
| ^^^^^^
|
|
|
|
warning: taken reference of right operand
|
|
--> $DIR/eq_op.rs:97:13
|
|
|
|
|
97 | let z = x & &y;
|
|
| ^^^^--
|
|
| |
|
|
| help: use the right value directly `y`
|
|
|
|
|
= note: #[warn(op_ref)] on by default
|
|
|
|
error: aborting due to 32 previous errors
|
|
|