@@ -8,6 +8,8 @@ help: use `+= 1` instead
8
8
|
9
9
LL | { let tmp = i; i += 1; tmp };
10
10
| +++++++++++ ~~~~~~~~~~~~~~~
11
+ LL | i += 1;
12
+ | ~~~~
11
13
12
14
error: Rust has no postfix increment operator
13
15
--> $DIR/increment-notfixed.rs:17:12
@@ -21,6 +23,8 @@ help: use `+= 1` instead
21
23
|
22
24
LL | while { let tmp = i; i += 1; tmp } < 5 {
23
25
| +++++++++++ ~~~~~~~~~~~~~~~
26
+ LL | while i += 1 < 5 {
27
+ | ~~~~
24
28
25
29
error: Rust has no postfix increment operator
26
30
--> $DIR/increment-notfixed.rs:25:8
@@ -32,6 +36,8 @@ help: use `+= 1` instead
32
36
|
33
37
LL | { let tmp_ = tmp; tmp += 1; tmp_ };
34
38
| ++++++++++++ ~~~~~~~~~~~~~~~~~~
39
+ LL | tmp += 1;
40
+ | ~~~~
35
41
36
42
error: Rust has no postfix increment operator
37
43
--> $DIR/increment-notfixed.rs:31:14
@@ -45,6 +51,8 @@ help: use `+= 1` instead
45
51
|
46
52
LL | while { let tmp_ = tmp; tmp += 1; tmp_ } < 5 {
47
53
| ++++++++++++ ~~~~~~~~~~~~~~~~~~
54
+ LL | while tmp += 1 < 5 {
55
+ | ~~~~
48
56
49
57
error: Rust has no postfix increment operator
50
58
--> $DIR/increment-notfixed.rs:39:16
@@ -56,6 +64,8 @@ help: use `+= 1` instead
56
64
|
57
65
LL | { let tmp = foo.bar.qux; foo.bar.qux += 1; tmp };
58
66
| +++++++++++ ~~~~~~~~~~~~~~~~~~~~~~~~~
67
+ LL | foo.bar.qux += 1;
68
+ | ~~~~
59
69
60
70
error: Rust has no postfix increment operator
61
71
--> $DIR/increment-notfixed.rs:49:10
@@ -67,6 +77,8 @@ help: use `+= 1` instead
67
77
|
68
78
LL | { let tmp = s.tmp; s.tmp += 1; tmp };
69
79
| +++++++++++ ~~~~~~~~~~~~~~~~~~~
80
+ LL | s.tmp += 1;
81
+ | ~~~~
70
82
71
83
error: Rust has no prefix increment operator
72
84
--> $DIR/increment-notfixed.rs:56:5
0 commit comments