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