2017-02-07 20:05:30 +00:00
|
|
|
error: this boolean expression can be simplified
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/eq_op.rs:47:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
47 | true && true;
|
2017-07-21 08:40:23 +00:00
|
|
|
| ^^^^^^^^^^^^ help: try: `true`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-08-01 14:30:44 +00:00
|
|
|
= note: `-D clippy::nonminimal-bool` implied by `-D warnings`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/eq_op.rs:49:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
49 | true || true;
|
2017-07-21 08:40:23 +00:00
|
|
|
| ^^^^^^^^^^^^ help: try: `true`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/eq_op.rs:55:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
55 | a == b && b == a;
|
2017-07-21 08:40:23 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^ help: try: `a == b`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/eq_op.rs:56:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
56 | a != b && b != a;
|
2017-07-21 08:40:23 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^ help: try: `a != b`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/eq_op.rs:57:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
57 | a < b && b > a;
|
2017-07-21 08:40:23 +00:00
|
|
|
| ^^^^^^^^^^^^^^ help: try: `a < b`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/eq_op.rs:58:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
58 | a <= b && b >= a;
|
2017-07-21 08:40:23 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^ help: try: `a <= b`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: equal expressions as operands to `==`
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/eq_op.rs:20:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
20 | 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`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: equal expressions as operands to `==`
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/eq_op.rs:21:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
21 | "no" == "no";
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: equal expressions as operands to `!=`
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/eq_op.rs:23:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
23 | false != false;
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: equal expressions as operands to `<`
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/eq_op.rs:24:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
24 | 1.5 < 1.5;
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
error: equal expressions as operands to `>=`
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/eq_op.rs:25:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
25 | 1u64 >= 1u64;
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: equal expressions as operands to `&`
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/eq_op.rs:28:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
28 | (1 as u64) & (1 as u64);
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: equal expressions as operands to `^`
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/eq_op.rs:29:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
29 | 1 ^ ((((((1))))));
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: equal expressions as operands to `<`
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/eq_op.rs:32:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
32 | (-(2) < -(2));
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: equal expressions as operands to `==`
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/eq_op.rs:33:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
33 | ((1 + 1) & (1 + 1) == (1 + 1) & (1 + 1));
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: equal expressions as operands to `&`
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/eq_op.rs:33:6
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
33 | ((1 + 1) & (1 + 1) == (1 + 1) & (1 + 1));
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: equal expressions as operands to `&`
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/eq_op.rs:33:27
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
33 | ((1 + 1) & (1 + 1) == (1 + 1) & (1 + 1));
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: equal expressions as operands to `==`
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/eq_op.rs:34:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
34 | (1 * 2) + (3 * 4) == 1 * 2 + 3 * 4;
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: equal expressions as operands to `!=`
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/eq_op.rs:37:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
37 | ([1] != [1]);
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: equal expressions as operands to `!=`
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/eq_op.rs:38:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
38 | ((1, 2) != (1, 2));
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: equal expressions as operands to `==`
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/eq_op.rs:42:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
42 | 1 + 1 == 2;
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error: equal expressions as operands to `==`
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/eq_op.rs:43:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
43 | 1 - 1 == 0;
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error: equal expressions as operands to `-`
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/eq_op.rs:43:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
43 | 1 - 1 == 0;
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
error: equal expressions as operands to `-`
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/eq_op.rs:45:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
45 | 1 - 1;
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
error: equal expressions as operands to `/`
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/eq_op.rs:46:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
46 | 1 / 1;
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
error: equal expressions as operands to `&&`
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/eq_op.rs:47:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
47 | true && true;
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: equal expressions as operands to `||`
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/eq_op.rs:49:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
49 | true || true;
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: equal expressions as operands to `&&`
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/eq_op.rs:55:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
55 | a == b && b == a;
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: equal expressions as operands to `&&`
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/eq_op.rs:56:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
56 | a != b && b != a;
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: equal expressions as operands to `&&`
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/eq_op.rs:57:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
57 | a < b && b > a;
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: equal expressions as operands to `&&`
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/eq_op.rs:58:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
58 | a <= b && b >= a;
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: equal expressions as operands to `==`
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/eq_op.rs:61:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
61 | a == a;
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^
|
|
|
|
|
2017-05-17 12:19:44 +00:00
|
|
|
error: taken reference of right operand
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/eq_op.rs:99:13
|
2017-04-28 15:07:39 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
99 | let z = x & &y;
|
2017-05-03 10:51:47 +00:00
|
|
|
| ^^^^--
|
|
|
|
| |
|
2017-07-21 08:40:23 +00:00
|
|
|
| help: use the right value directly: `y`
|
2017-04-28 15:07:39 +00:00
|
|
|
|
|
2018-08-01 14:30:44 +00:00
|
|
|
= note: `-D clippy::op-ref` implied by `-D warnings`
|
2017-05-17 12:19:44 +00:00
|
|
|
|
2018-03-23 18:26:52 +00:00
|
|
|
error: equal expressions as operands to `/`
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/eq_op.rs:107:20
|
|
|
|
|
|
|
|
|
107 | const D: u32 = A / A;
|
|
|
|
| ^^^^^
|
2018-03-23 18:26:52 +00:00
|
|
|
|
|
|
|
error: aborting due to 34 previous errors
|
2018-01-16 16:06:27 +00:00
|
|
|
|