2017-02-07 14:05:30 -06:00
|
|
|
error: assign operation detected
|
|
|
|
--> $DIR/assign_ops.rs:8:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
8 | i += 2;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
|
note: lint level defined here
|
|
|
|
--> $DIR/assign_ops.rs:4:8
|
|
|
|
|
|
|
|
|
4 | #[deny(assign_ops)]
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
help: replace it with
|
2017-02-08 07:58:07 -06:00
|
|
|
| i = i + 2;
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: assign operation detected
|
|
|
|
--> $DIR/assign_ops.rs:11:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
11 | i += 2 + 17;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: replace it with
|
2017-02-08 07:58:07 -06:00
|
|
|
| i = i + 2 + 17;
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: assign operation detected
|
|
|
|
--> $DIR/assign_ops.rs:14:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
14 | i -= 6;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
|
help: replace it with
|
2017-02-08 07:58:07 -06:00
|
|
|
| i = i - 6;
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: assign operation detected
|
|
|
|
--> $DIR/assign_ops.rs:17:5
|
|
|
|
|
|
|
|
|
17 | i -= 2 - 1;
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: replace it with
|
|
|
|
| i = i - (2 - 1);
|
|
|
|
|
|
|
|
error: assign operation detected
|
|
|
|
--> $DIR/assign_ops.rs:21:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
21 | i *= 5;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
|
help: replace it with
|
2017-02-08 07:58:07 -06:00
|
|
|
| i = i * 5;
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: assign operation detected
|
|
|
|
--> $DIR/assign_ops.rs:24:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
24 | i *= 1+5;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
|
|
|
help: replace it with
|
2017-02-08 07:58:07 -06:00
|
|
|
| i = i * (1+5);
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: assign operation detected
|
|
|
|
--> $DIR/assign_ops.rs:27:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
27 | i /= 32;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
|
help: replace it with
|
2017-02-08 07:58:07 -06:00
|
|
|
| i = i / 32;
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: assign operation detected
|
|
|
|
--> $DIR/assign_ops.rs:30:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
30 | i /= 32 | 5;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: replace it with
|
2017-02-08 07:58:07 -06:00
|
|
|
| i = i / (32 | 5);
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: assign operation detected
|
|
|
|
--> $DIR/assign_ops.rs:33:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
33 | i /= 32 / 5;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: replace it with
|
2017-02-08 07:58:07 -06:00
|
|
|
| i = i / (32 / 5);
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: assign operation detected
|
|
|
|
--> $DIR/assign_ops.rs:36:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
36 | i %= 42;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
|
help: replace it with
|
2017-02-08 07:58:07 -06:00
|
|
|
| i = i % 42;
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: assign operation detected
|
|
|
|
--> $DIR/assign_ops.rs:39:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
39 | i >>= i;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
|
help: replace it with
|
2017-02-08 07:58:07 -06:00
|
|
|
| i = i >> i;
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: assign operation detected
|
|
|
|
--> $DIR/assign_ops.rs:42:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
42 | i <<= 9 + 6 - 7;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: replace it with
|
2017-02-08 07:58:07 -06:00
|
|
|
| i = i << (9 + 6 - 7);
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: assign operation detected
|
|
|
|
--> $DIR/assign_ops.rs:45:5
|
|
|
|
|
|
|
|
|
45 | i += 1 << 5;
|
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: replace it with
|
|
|
|
| i = i + (1 << 5);
|
|
|
|
|
|
|
|
error: manual implementation of an assign operation
|
|
|
|
--> $DIR/assign_ops.rs:55:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
55 | a = a + 1;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: lint level defined here
|
|
|
|
--> $DIR/assign_ops.rs:52:8
|
|
|
|
|
|
|
|
|
52 | #[deny(assign_op_pattern)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
help: replace it with
|
2017-02-08 07:58:07 -06:00
|
|
|
| a += 1;
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: manual implementation of an assign operation
|
|
|
|
--> $DIR/assign_ops.rs:58:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
58 | a = 1 + a;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: replace it with
|
2017-02-08 07:58:07 -06:00
|
|
|
| a += 1;
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: manual implementation of an assign operation
|
|
|
|
--> $DIR/assign_ops.rs:61:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
61 | a = a - 1;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: replace it with
|
2017-02-08 07:58:07 -06:00
|
|
|
| a -= 1;
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: manual implementation of an assign operation
|
|
|
|
--> $DIR/assign_ops.rs:64:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
64 | a = a * 99;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: replace it with
|
2017-02-08 07:58:07 -06:00
|
|
|
| a *= 99;
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: manual implementation of an assign operation
|
|
|
|
--> $DIR/assign_ops.rs:67:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
67 | a = 42 * a;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: replace it with
|
2017-02-08 07:58:07 -06:00
|
|
|
| a *= 42;
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: manual implementation of an assign operation
|
|
|
|
--> $DIR/assign_ops.rs:70:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
70 | a = a / 2;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: replace it with
|
2017-02-08 07:58:07 -06:00
|
|
|
| a /= 2;
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: manual implementation of an assign operation
|
|
|
|
--> $DIR/assign_ops.rs:73:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
73 | a = a % 5;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: replace it with
|
2017-02-08 07:58:07 -06:00
|
|
|
| a %= 5;
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: manual implementation of an assign operation
|
|
|
|
--> $DIR/assign_ops.rs:76:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
76 | a = a & 1;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: replace it with
|
2017-02-08 07:58:07 -06:00
|
|
|
| a &= 1;
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: aborting due to 21 previous errors
|
|
|
|
|