1
Fork 0
rust/src/test/ui/parser/increment-autofix.stderr

58 lines
1.3 KiB
Text
Raw Normal View History

error: Rust has no postfix increment operator
--> $DIR/increment-autofix.rs:5:6
|
LL | i++;
| ^^ not a valid postfix operator
|
help: use `+= 1` instead
|
LL | { let tmp = i; i += 1; tmp };
| +++++++++++ ~~~~~~~~~~~~~~~
help: or, if you don't need to use it as an expression, change it to this
|
LL - i++;
LL + i += 1;
|
error: Rust has no postfix increment operator
--> $DIR/increment-autofix.rs:11:12
|
LL | while i++ < 5 {
| ^^ not a valid postfix operator
|
help: use `+= 1` instead
|
LL | while { let tmp = i; i += 1; tmp } < 5 {
| +++++++++++ ~~~~~~~~~~~~~~~
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 {
|
error: Rust has no prefix increment operator
--> $DIR/increment-autofix.rs:19:5
|
LL | ++i;
| ^^ not a valid prefix operator
|
help: use `+= 1` instead
|
LL - ++i;
LL + i += 1;
|
error: Rust has no prefix increment operator
--> $DIR/increment-autofix.rs:25:11
|
LL | while ++i < 5 {
| ^^ not a valid prefix operator
|
help: use `+= 1` instead
|
LL | while { i += 1; i } < 5 {
| ~ +++++++++
error: aborting due to 4 previous errors