rust/tests/ui/eq_op.stderr

215 lines
4.7 KiB
Plaintext
Raw Normal View History

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