]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/increment-notfixed.stderr
:arrow_up: rust-analyzer
[rust.git] / src / test / ui / parser / increment-notfixed.stderr
1 error: Rust has no postfix increment operator
2   --> $DIR/increment-notfixed.rs:11:6
3    |
4 LL |     i++;
5    |      ^^ not a valid postfix operator
6    |
7 help: use `+= 1` instead
8    |
9 LL |     { let tmp = i; i += 1; tmp };
10    |     +++++++++++  ~~~~~~~~~~~~~~~
11 LL -     i++;
12 LL +     i += 1;
13    |
14
15 error: Rust has no postfix increment operator
16   --> $DIR/increment-notfixed.rs:17:12
17    |
18 LL |     while i++ < 5 {
19    |     -----  ^^ not a valid postfix operator
20    |     |
21    |     while parsing the condition of this `while` expression
22    |
23 help: use `+= 1` instead
24    |
25 LL |     while { let tmp = i; i += 1; tmp } < 5 {
26    |           +++++++++++  ~~~~~~~~~~~~~~~
27 LL -     while i++ < 5 {
28 LL +     while i += 1 < 5 {
29    |
30
31 error: Rust has no postfix increment operator
32   --> $DIR/increment-notfixed.rs:25:8
33    |
34 LL |     tmp++;
35    |        ^^ not a valid postfix operator
36    |
37 help: use `+= 1` instead
38    |
39 LL |     { let tmp_ = tmp; tmp += 1; tmp_ };
40    |     ++++++++++++    ~~~~~~~~~~~~~~~~~~
41 LL -     tmp++;
42 LL +     tmp += 1;
43    |
44
45 error: Rust has no postfix increment operator
46   --> $DIR/increment-notfixed.rs:31:14
47    |
48 LL |     while tmp++ < 5 {
49    |     -----    ^^ not a valid postfix operator
50    |     |
51    |     while parsing the condition of this `while` expression
52    |
53 help: use `+= 1` instead
54    |
55 LL |     while { let tmp_ = tmp; tmp += 1; tmp_ } < 5 {
56    |           ++++++++++++    ~~~~~~~~~~~~~~~~~~
57 LL -     while tmp++ < 5 {
58 LL +     while tmp += 1 < 5 {
59    |
60
61 error: Rust has no postfix increment operator
62   --> $DIR/increment-notfixed.rs:39:16
63    |
64 LL |     foo.bar.qux++;
65    |                ^^ not a valid postfix operator
66    |
67 help: use `+= 1` instead
68    |
69 LL |     { let tmp = foo.bar.qux; foo.bar.qux += 1; tmp };
70    |     +++++++++++            ~~~~~~~~~~~~~~~~~~~~~~~~~
71 LL -     foo.bar.qux++;
72 LL +     foo.bar.qux += 1;
73    |
74
75 error: Rust has no postfix increment operator
76   --> $DIR/increment-notfixed.rs:49:10
77    |
78 LL |     s.tmp++;
79    |          ^^ not a valid postfix operator
80    |
81 help: use `+= 1` instead
82    |
83 LL |     { let tmp = s.tmp; s.tmp += 1; tmp };
84    |     +++++++++++      ~~~~~~~~~~~~~~~~~~~
85 LL -     s.tmp++;
86 LL +     s.tmp += 1;
87    |
88
89 error: Rust has no prefix increment operator
90   --> $DIR/increment-notfixed.rs:56:5
91    |
92 LL |     ++foo.bar.qux;
93    |     ^^ not a valid prefix operator
94    |
95 help: use `+= 1` instead
96    |
97 LL -     ++foo.bar.qux;
98 LL +     foo.bar.qux += 1;
99    |
100
101 error: aborting due to 7 previous errors
102