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