2021-09-06 16:16:52 -07:00
|
|
|
error: Rust has no postfix increment operator
|
2022-02-17 12:28:07 -08:00
|
|
|
--> $DIR/increment-autofix.rs:5:6
|
2021-03-25 21:04:03 -07:00
|
|
|
|
|
|
|
|
LL | i++;
|
2021-09-06 16:16:52 -07:00
|
|
|
| ^^ not a valid postfix operator
|
2021-03-25 21:04:03 -07:00
|
|
|
|
|
2021-09-06 16:16:52 -07:00
|
|
|
help: use `+= 1` instead
|
2021-03-25 21:04:03 -07:00
|
|
|
|
|
2021-09-06 16:16:52 -07:00
|
|
|
LL | { let tmp = i; i += 1; tmp };
|
|
|
|
| +++++++++++ ~~~~~~~~~~~~~~~
|
2022-02-17 14:52:52 -08:00
|
|
|
help: or, if you don't need to use it as an expression, change it to this
|
|
|
|
|
|
|
|
|
LL - i++;
|
|
|
|
LL + i += 1;
|
|
|
|
|
|
2021-03-25 21:04:03 -07:00
|
|
|
|
2021-09-06 16:16:52 -07:00
|
|
|
error: Rust has no postfix increment operator
|
2022-02-17 12:28:07 -08:00
|
|
|
--> $DIR/increment-autofix.rs:11:12
|
2021-03-25 21:04:03 -07:00
|
|
|
|
|
|
|
|
LL | while i++ < 5 {
|
2021-09-06 16:16:52 -07:00
|
|
|
| ^^ not a valid postfix operator
|
2021-03-25 21:04:03 -07:00
|
|
|
|
|
2021-09-06 16:16:52 -07:00
|
|
|
help: use `+= 1` instead
|
2021-03-25 21:04:03 -07:00
|
|
|
|
|
2021-09-06 16:16:52 -07:00
|
|
|
LL | while { let tmp = i; i += 1; tmp } < 5 {
|
|
|
|
| +++++++++++ ~~~~~~~~~~~~~~~
|
2022-02-17 14:52:52 -08:00
|
|
|
help: or, if you don't need to use it as an expression, change it to this
|
|
|
|
|
|
|
|
|
LL - while i++ < 5 {
|
|
|
|
LL + while i += 1 < 5 {
|
|
|
|
|
|
2021-03-25 21:04:03 -07:00
|
|
|
|
2021-09-06 16:16:52 -07:00
|
|
|
error: Rust has no prefix increment operator
|
2022-02-17 12:28:07 -08:00
|
|
|
--> $DIR/increment-autofix.rs:19:5
|
2021-03-25 21:04:03 -07:00
|
|
|
|
|
|
|
|
LL | ++i;
|
2021-09-06 16:16:52 -07:00
|
|
|
| ^^ not a valid prefix operator
|
2021-03-25 21:04:03 -07:00
|
|
|
|
|
2021-09-06 16:16:52 -07:00
|
|
|
help: use `+= 1` instead
|
2021-03-25 21:04:03 -07:00
|
|
|
|
|
|
|
|
LL - ++i;
|
|
|
|
LL + i += 1;
|
|
|
|
|
|
|
|
|
|
2021-09-06 16:16:52 -07:00
|
|
|
error: Rust has no prefix increment operator
|
2022-02-17 12:28:07 -08:00
|
|
|
--> $DIR/increment-autofix.rs:25:11
|
2021-03-25 21:04:03 -07:00
|
|
|
|
|
|
|
|
LL | while ++i < 5 {
|
2021-09-06 16:16:52 -07:00
|
|
|
| ^^ not a valid prefix operator
|
2021-03-25 21:04:03 -07:00
|
|
|
|
|
2021-09-06 16:16:52 -07:00
|
|
|
help: use `+= 1` instead
|
2021-03-25 21:04:03 -07:00
|
|
|
|
|
2021-09-06 16:16:52 -07:00
|
|
|
LL | while { i += 1; i } < 5 {
|
|
|
|
| ~ +++++++++
|
2021-03-25 21:04:03 -07:00
|
|
|
|
|
|
|
error: aborting due to 4 previous errors
|
|
|
|
|