fork/rust

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

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

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