]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/increment-autofix.stderr
Account for ADT bodies and struct expressions
[rust.git] / src / test / ui / parser / increment-autofix.stderr
1 error: Rust has no prefix increment operator
2   --> $DIR/increment-autofix.rs:5:5
3    |
4 LL |     ++i;
5    |     ^^ not a valid prefix operator
6    |
7 help: use `+= 1` instead
8    |
9 LL -     ++i;
10 LL +     i += 1;
11    |
12
13 error: Rust has no prefix increment operator
14   --> $DIR/increment-autofix.rs:11:11
15    |
16 LL |     while ++i < 5 {
17    |     ----- ^^ not a valid prefix operator
18    |     |
19    |     while parsing the condition of this `while` expression
20    |
21 help: use `+= 1` instead
22    |
23 LL |     while { i += 1; i } < 5 {
24    |           ~   +++++++++
25
26 error: Rust has no prefix increment operator
27   --> $DIR/increment-autofix.rs:19:5
28    |
29 LL |     ++tmp;
30    |     ^^ not a valid prefix operator
31    |
32 help: use `+= 1` instead
33    |
34 LL -     ++tmp;
35 LL +     tmp += 1;
36    |
37
38 error: Rust has no prefix increment operator
39   --> $DIR/increment-autofix.rs:25:11
40    |
41 LL |     while ++tmp < 5 {
42    |     ----- ^^ not a valid prefix operator
43    |     |
44    |     while parsing the condition of this `while` expression
45    |
46 help: use `+= 1` instead
47    |
48 LL |     while { tmp += 1; tmp } < 5 {
49    |           ~     +++++++++++
50
51 error: aborting due to 4 previous errors
52