]> git.lizzy.rs Git - rust.git/blob - tests/ui/parser/issue-104867-inc-dec.stderr
Merge commit '1480cea393d0cee195e59949eabdfbcf1230f7f9' into clippyup
[rust.git] / tests / ui / parser / issue-104867-inc-dec.stderr
1 error: Rust has no postfix increment operator
2   --> $DIR/issue-104867-inc-dec.rs:7:6
3    |
4 LL |     i++;
5    |      ^^ not a valid postfix operator
6    |
7 help: use `+= 1` instead
8    |
9 LL |     i += 1;
10    |       ~~~~
11
12 error: Rust has no postfix increment operator
13   --> $DIR/issue-104867-inc-dec.rs:12:8
14    |
15 LL |     s.x++;
16    |        ^^ not a valid postfix operator
17    |
18 help: use `+= 1` instead
19    |
20 LL |     s.x += 1;
21    |         ~~~~
22
23 error: Rust has no postfix increment operator
24   --> $DIR/issue-104867-inc-dec.rs:17:9
25    |
26 LL |     if i++ == 1 {}
27    |         ^^ not a valid postfix operator
28    |
29 help: use `+= 1` instead
30    |
31 LL |     if { let tmp = i; i += 1; tmp } == 1 {}
32    |        +++++++++++  ~~~~~~~~~~~~~~~
33
34 error: Rust has no prefix increment operator
35   --> $DIR/issue-104867-inc-dec.rs:22:5
36    |
37 LL |     ++i;
38    |     ^^ not a valid prefix operator
39    |
40 help: use `+= 1` instead
41    |
42 LL -     ++i;
43 LL +     i += 1;
44    |
45
46 error: Rust has no prefix increment operator
47   --> $DIR/issue-104867-inc-dec.rs:27:8
48    |
49 LL |     if ++i == 1 { }
50    |        ^^ not a valid prefix operator
51    |
52 help: use `+= 1` instead
53    |
54 LL |     if { i += 1; i } == 1 { }
55    |        ~   +++++++++
56
57 error: Rust has no postfix increment operator
58   --> $DIR/issue-104867-inc-dec.rs:33:6
59    |
60 LL |     i++;
61    |      ^^ not a valid postfix operator
62    |
63 help: use `+= 1` instead
64    |
65 LL |     i += 1;
66    |       ~~~~
67
68 error: Rust has no prefix increment operator
69   --> $DIR/issue-104867-inc-dec.rs:41:5
70    |
71 LL |     ++i;
72    |     ^^ not a valid prefix operator
73    |
74 help: use `+= 1` instead
75    |
76 LL -     ++i;
77 LL +     i += 1;
78    |
79
80 error: aborting due to 7 previous errors
81