fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.9 KiB84 linesraw
1error: Rust has no postfix increment operator
2  --> $DIR/increment-autofix-2.rs:13:6
3   |
4LL |     i++;
5   |      ^^ not a valid postfix operator
6   |
7help: use `+= 1` instead
8   |
9LL |     i += 1;
10   |       ~~~~
11
12error: Rust has no postfix increment operator
13  --> $DIR/increment-autofix-2.rs:19:12
14   |
15LL |     while i++ < 5 {
16   |     -----  ^^ not a valid postfix operator
17   |     |
18   |     while parsing the condition of this `while` expression
19   |
20help: use `+= 1` instead
21   |
22LL |     while { let tmp = i; i += 1; tmp } < 5 {
23   |           +++++++++++  ~~~~~~~~~~~~~~~
24
25error: Rust has no postfix increment operator
26  --> $DIR/increment-autofix-2.rs:27:8
27   |
28LL |     tmp++;
29   |        ^^ not a valid postfix operator
30   |
31help: use `+= 1` instead
32   |
33LL |     tmp += 1;
34   |         ~~~~
35
36error: Rust has no postfix increment operator
37  --> $DIR/increment-autofix-2.rs:33:14
38   |
39LL |     while tmp++ < 5 {
40   |     -----    ^^ not a valid postfix operator
41   |     |
42   |     while parsing the condition of this `while` expression
43   |
44help: use `+= 1` instead
45   |
46LL |     while { let tmp_ = tmp; tmp += 1; tmp_ } < 5 {
47   |           ++++++++++++    ~~~~~~~~~~~~~~~~~~
48
49error: Rust has no postfix increment operator
50  --> $DIR/increment-autofix-2.rs:41:16
51   |
52LL |     foo.bar.qux++;
53   |                ^^ not a valid postfix operator
54   |
55help: use `+= 1` instead
56   |
57LL |     foo.bar.qux += 1;
58   |                 ~~~~
59
60error: Rust has no postfix increment operator
61  --> $DIR/increment-autofix-2.rs:51:10
62   |
63LL |     s.tmp++;
64   |          ^^ not a valid postfix operator
65   |
66help: use `+= 1` instead
67   |
68LL |     s.tmp += 1;
69   |           ~~~~
70
71error: Rust has no prefix increment operator
72  --> $DIR/increment-autofix-2.rs:58:5
73   |
74LL |     ++foo.bar.qux;
75   |     ^^ not a valid prefix operator
76   |
77help: use `+= 1` instead
78   |
79LL -     ++foo.bar.qux;
80LL +     foo.bar.qux += 1;
81   |
82
83error: aborting due to 7 previous errors
84