2017-02-07 14:05:30 -06:00
|
|
|
error: this boolean expression can be simplified
|
|
|
|
--> $DIR/eq_op.rs:41:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
41 | true && true;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: lint level defined here
|
|
|
|
--> $DIR/eq_op.rs:7:8
|
|
|
|
|
|
|
|
|
7 | #[deny(nonminimal_bool)]
|
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
help: try
|
2017-02-08 07:58:07 -06:00
|
|
|
| true;
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
|
|
|
--> $DIR/eq_op.rs:43:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
43 | true || true;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try
|
2017-02-08 07:58:07 -06:00
|
|
|
| true;
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
|
|
|
--> $DIR/eq_op.rs:49:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
49 | a == b && b == a;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try
|
2017-02-08 07:58:07 -06:00
|
|
|
| a == b;
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
|
|
|
--> $DIR/eq_op.rs:51:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
51 | a != b && b != a;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try
|
2017-02-08 07:58:07 -06:00
|
|
|
| a != b;
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
|
|
|
--> $DIR/eq_op.rs:53:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
53 | a < b && b > a;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try
|
2017-02-08 07:58:07 -06:00
|
|
|
| a < b;
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
|
|
|
--> $DIR/eq_op.rs:55:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
55 | a <= b && b >= a;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try
|
2017-02-08 07:58:07 -06:00
|
|
|
| a <= b;
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: equal expressions as operands to `==`
|
|
|
|
--> $DIR/eq_op.rs:10:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
10 | 1 == 1;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
11 | "no" == "no";
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: equal expressions as operands to `!=`
|
|
|
|
--> $DIR/eq_op.rs:13:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
13 | false != false;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: equal expressions as operands to `<`
|
|
|
|
--> $DIR/eq_op.rs:14:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
14 | 1.5 < 1.5;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
error: equal expressions as operands to `>=`
|
|
|
|
--> $DIR/eq_op.rs:15:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
15 | 1u64 >= 1u64;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: equal expressions as operands to `&`
|
|
|
|
--> $DIR/eq_op.rs:18:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
18 | (1 as u64) & (1 as u64);
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: equal expressions as operands to `^`
|
|
|
|
--> $DIR/eq_op.rs:19:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
19 | 1 ^ ((((((1))))));
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: equal expressions as operands to `<`
|
|
|
|
--> $DIR/eq_op.rs:22:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
22 | (-(2) < -(2));
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
27 | (1 * 2) + (3 * 4) == 1 * 2 + 3 * 4;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: equal expressions as operands to `!=`
|
|
|
|
--> $DIR/eq_op.rs:30:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
30 | ([1] != [1]);
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: equal expressions as operands to `!=`
|
|
|
|
--> $DIR/eq_op.rs:31:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
31 | ((1, 2) != (1, 2));
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: equal expressions as operands to `==`
|
|
|
|
--> $DIR/eq_op.rs:35:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
35 | 1 + 1 == 2;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error: equal expressions as operands to `==`
|
|
|
|
--> $DIR/eq_op.rs:36:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
36 | 1 - 1 == 0;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error: equal expressions as operands to `-`
|
|
|
|
--> $DIR/eq_op.rs:36:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
36 | 1 - 1 == 0;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
error: equal expressions as operands to `-`
|
|
|
|
--> $DIR/eq_op.rs:39:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
39 | 1 - 1;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
error: equal expressions as operands to `/`
|
|
|
|
--> $DIR/eq_op.rs:40:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
40 | 1 / 1;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
error: equal expressions as operands to `&&`
|
|
|
|
--> $DIR/eq_op.rs:41:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
41 | true && true;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: equal expressions as operands to `||`
|
|
|
|
--> $DIR/eq_op.rs:43:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
43 | true || true;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: equal expressions as operands to `&&`
|
|
|
|
--> $DIR/eq_op.rs:49:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
49 | a == b && b == a;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: equal expressions as operands to `&&`
|
|
|
|
--> $DIR/eq_op.rs:51:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
51 | a != b && b != a;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: equal expressions as operands to `&&`
|
|
|
|
--> $DIR/eq_op.rs:53:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
53 | a < b && b > a;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: equal expressions as operands to `&&`
|
|
|
|
--> $DIR/eq_op.rs:55:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
55 | a <= b && b >= a;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: equal expressions as operands to `==`
|
|
|
|
--> $DIR/eq_op.rs:59:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
59 | a == a;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
error: aborting due to 32 previous errors
|
|
|
|
|