rust-clippy/tests/ui/eq_op.stderr

167 lines
3.5 KiB
Text
Raw Normal View History

error: equal expressions as operands to `==`
2019-09-20 05:54:16 +00:00
--> $DIR/eq_op.rs:9:5
|
2018-12-27 15:57:55 +00:00
LL | 1 == 1;
| ^^^^^^
|
= note: `-D clippy::eq-op` implied by `-D warnings`
error: equal expressions as operands to `==`
2019-09-20 05:54:16 +00:00
--> $DIR/eq_op.rs:10:5
|
2018-12-27 15:57:55 +00:00
LL | "no" == "no";
| ^^^^^^^^^^^^
error: equal expressions as operands to `!=`
2019-09-20 05:54:16 +00:00
--> $DIR/eq_op.rs:12:5
|
2018-12-27 15:57:55 +00:00
LL | false != false;
| ^^^^^^^^^^^^^^
error: equal expressions as operands to `<`
2019-09-20 05:54:16 +00:00
--> $DIR/eq_op.rs:13:5
|
2018-12-27 15:57:55 +00:00
LL | 1.5 < 1.5;
| ^^^^^^^^^
error: equal expressions as operands to `>=`
2019-09-20 05:54:16 +00:00
--> $DIR/eq_op.rs:14:5
|
2018-12-27 15:57:55 +00:00
LL | 1u64 >= 1u64;
| ^^^^^^^^^^^^
error: equal expressions as operands to `&`
2019-09-20 05:54:16 +00:00
--> $DIR/eq_op.rs:17:5
|
2018-12-27 15:57:55 +00:00
LL | (1 as u64) & (1 as u64);
| ^^^^^^^^^^^^^^^^^^^^^^^
error: equal expressions as operands to `^`
2019-09-20 05:54:16 +00:00
--> $DIR/eq_op.rs:18:5
|
2018-12-27 15:57:55 +00:00
LL | 1 ^ ((((((1))))));
| ^^^^^^^^^^^^^^^^^
error: equal expressions as operands to `<`
2019-09-20 05:54:16 +00:00
--> $DIR/eq_op.rs:21:5
|
2018-12-27 15:57:55 +00:00
LL | (-(2) < -(2));
| ^^^^^^^^^^^^^
error: equal expressions as operands to `==`
2019-09-20 05:54:16 +00:00
--> $DIR/eq_op.rs:22:5
|
2018-12-27 15:57:55 +00:00
LL | ((1 + 1) & (1 + 1) == (1 + 1) & (1 + 1));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: equal expressions as operands to `&`
2019-09-20 05:54:16 +00:00
--> $DIR/eq_op.rs:22:6
|
2018-12-27 15:57:55 +00:00
LL | ((1 + 1) & (1 + 1) == (1 + 1) & (1 + 1));
| ^^^^^^^^^^^^^^^^^
error: equal expressions as operands to `&`
2019-09-20 05:54:16 +00:00
--> $DIR/eq_op.rs:22:27
|
2018-12-27 15:57:55 +00:00
LL | ((1 + 1) & (1 + 1) == (1 + 1) & (1 + 1));
| ^^^^^^^^^^^^^^^^^
error: equal expressions as operands to `==`
2019-09-20 05:54:16 +00:00
--> $DIR/eq_op.rs:23:5
|
2018-12-27 15:57:55 +00:00
LL | (1 * 2) + (3 * 4) == 1 * 2 + 3 * 4;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: equal expressions as operands to `!=`
2019-09-20 05:54:16 +00:00
--> $DIR/eq_op.rs:26:5
|
2018-12-27 15:57:55 +00:00
LL | ([1] != [1]);
| ^^^^^^^^^^^^
error: equal expressions as operands to `!=`
2019-09-20 05:54:16 +00:00
--> $DIR/eq_op.rs:27:5
|
2018-12-27 15:57:55 +00:00
LL | ((1, 2) != (1, 2));
| ^^^^^^^^^^^^^^^^^^
error: equal expressions as operands to `==`
2019-09-20 05:54:16 +00:00
--> $DIR/eq_op.rs:31:5
|
2018-12-27 15:57:55 +00:00
LL | 1 + 1 == 2;
| ^^^^^^^^^^
error: equal expressions as operands to `==`
2019-09-20 05:54:16 +00:00
--> $DIR/eq_op.rs:32:5
|
2018-12-27 15:57:55 +00:00
LL | 1 - 1 == 0;
| ^^^^^^^^^^
error: equal expressions as operands to `-`
2019-09-20 05:54:16 +00:00
--> $DIR/eq_op.rs:32:5
|
2018-12-27 15:57:55 +00:00
LL | 1 - 1 == 0;
| ^^^^^
error: equal expressions as operands to `-`
2019-09-20 05:54:16 +00:00
--> $DIR/eq_op.rs:34:5
|
2018-12-27 15:57:55 +00:00
LL | 1 - 1;
| ^^^^^
error: equal expressions as operands to `/`
2019-09-20 05:54:16 +00:00
--> $DIR/eq_op.rs:35:5
|
2018-12-27 15:57:55 +00:00
LL | 1 / 1;
| ^^^^^
error: equal expressions as operands to `&&`
2019-09-20 05:54:16 +00:00
--> $DIR/eq_op.rs:36:5
|
2018-12-27 15:57:55 +00:00
LL | true && true;
| ^^^^^^^^^^^^
error: equal expressions as operands to `||`
2019-09-20 05:54:16 +00:00
--> $DIR/eq_op.rs:38:5
|
2018-12-27 15:57:55 +00:00
LL | true || true;
| ^^^^^^^^^^^^
error: equal expressions as operands to `&&`
2019-09-20 05:54:16 +00:00
--> $DIR/eq_op.rs:44:5
|
2018-12-27 15:57:55 +00:00
LL | a == b && b == a;
| ^^^^^^^^^^^^^^^^
error: equal expressions as operands to `&&`
2019-09-20 05:54:16 +00:00
--> $DIR/eq_op.rs:45:5
|
2018-12-27 15:57:55 +00:00
LL | a != b && b != a;
| ^^^^^^^^^^^^^^^^
error: equal expressions as operands to `&&`
2019-09-20 05:54:16 +00:00
--> $DIR/eq_op.rs:46:5
|
2018-12-27 15:57:55 +00:00
LL | a < b && b > a;
| ^^^^^^^^^^^^^^
error: equal expressions as operands to `&&`
2019-09-20 05:54:16 +00:00
--> $DIR/eq_op.rs:47:5
|
2018-12-27 15:57:55 +00:00
LL | a <= b && b >= a;
| ^^^^^^^^^^^^^^^^
error: equal expressions as operands to `==`
2019-09-20 05:54:16 +00:00
--> $DIR/eq_op.rs:50:5
|
2018-12-27 15:57:55 +00:00
LL | a == a;
| ^^^^^^
error: equal expressions as operands to `/`
2019-09-20 05:54:16 +00:00
--> $DIR/eq_op.rs:60:20
2018-12-27 15:57:55 +00:00
|
LL | const D: u32 = A / A;
| ^^^^^
error: aborting due to 27 previous errors
2018-01-16 16:06:27 +00:00