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