rust-clippy/tests/ui/eq_op.stderr

224 lines
4.5 KiB
Text
Raw Normal View History

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