@@ -2,51 +2,93 @@ error: variable appears on both sides of an assignment operation
2
2
--> $DIR/assign_ops2.rs:8:5
3
3
|
4
4
8 | a += a + 1;
5
- | ^^^^^^^^^^ help: replace it with: `a += 1`
5
+ | ^^^^^^^^^^
6
6
|
7
7
= note: `-D misrefactored-assign-op` implied by `-D warnings`
8
+ help: Did you mean a = a + 1 or a = a + a + 1? Consider replacing it with
9
+ |
10
+ 8 | a += 1;
11
+ | ^^^^^^
8
12
9
13
error: variable appears on both sides of an assignment operation
10
14
--> $DIR/assign_ops2.rs:9:5
11
15
|
12
16
9 | a += 1 + a;
13
- | ^^^^^^^^^^ help: replace it with: `a += 1`
17
+ | ^^^^^^^^^^
18
+ help: Did you mean a = a + 1 or a = a + 1 + a? Consider replacing it with
19
+ |
20
+ 9 | a += 1;
21
+ | ^^^^^^
14
22
15
23
error: variable appears on both sides of an assignment operation
16
24
--> $DIR/assign_ops2.rs:10:5
17
25
|
18
26
10 | a -= a - 1;
19
- | ^^^^^^^^^^ help: replace it with: `a -= 1`
27
+ | ^^^^^^^^^^
28
+ help: Did you mean a = a - 1 or a = a - (a - 1)? Consider replacing it with
29
+ |
30
+ 10 | a -= 1;
31
+ | ^^^^^^
20
32
21
33
error: variable appears on both sides of an assignment operation
22
34
--> $DIR/assign_ops2.rs:11:5
23
35
|
24
36
11 | a *= a * 99;
25
- | ^^^^^^^^^^^ help: replace it with: `a *= 99`
37
+ | ^^^^^^^^^^^
38
+ help: Did you mean a = a * 99 or a = a * a * 99? Consider replacing it with
39
+ |
40
+ 11 | a *= 99;
41
+ | ^^^^^^^
26
42
27
43
error: variable appears on both sides of an assignment operation
28
44
--> $DIR/assign_ops2.rs:12:5
29
45
|
30
46
12 | a *= 42 * a;
31
- | ^^^^^^^^^^^ help: replace it with: `a *= 42`
47
+ | ^^^^^^^^^^^
48
+ help: Did you mean a = a * 42 or a = a * 42 * a? Consider replacing it with
49
+ |
50
+ 12 | a *= 42;
51
+ | ^^^^^^^
32
52
33
53
error: variable appears on both sides of an assignment operation
34
54
--> $DIR/assign_ops2.rs:13:5
35
55
|
36
56
13 | a /= a / 2;
37
- | ^^^^^^^^^^ help: replace it with: `a /= 2`
57
+ | ^^^^^^^^^^
58
+ help: Did you mean a = a / 2 or a = a / (a / 2)? Consider replacing it with
59
+ |
60
+ 13 | a /= 2;
61
+ | ^^^^^^
38
62
39
63
error: variable appears on both sides of an assignment operation
40
64
--> $DIR/assign_ops2.rs:14:5
41
65
|
42
66
14 | a %= a % 5;
43
- | ^^^^^^^^^^ help: replace it with: `a %= 5`
67
+ | ^^^^^^^^^^
68
+ help: Did you mean a = a % 5 or a = a % (a % 5)? Consider replacing it with
69
+ |
70
+ 14 | a %= 5;
71
+ | ^^^^^^
44
72
45
73
error: variable appears on both sides of an assignment operation
46
74
--> $DIR/assign_ops2.rs:15:5
47
75
|
48
76
15 | a &= a & 1;
49
- | ^^^^^^^^^^ help: replace it with: `a &= 1`
77
+ | ^^^^^^^^^^
78
+ help: Did you mean a = a & 1 or a = a & a & 1? Consider replacing it with
79
+ |
80
+ 15 | a &= 1;
81
+ | ^^^^^^
82
+
83
+ error: variable appears on both sides of an assignment operation
84
+ --> $DIR/assign_ops2.rs:16:5
85
+ |
86
+ 16 | a *= a * a;
87
+ | ^^^^^^^^^^
88
+ help: Did you mean a = a * a or a = a * a * a? Consider replacing it with
89
+ |
90
+ 16 | a *= a;
91
+ | ^^^^^^
50
92
51
- error: aborting due to 8 previous errors
93
+ error: aborting due to 9 previous errors
52
94
0 commit comments