]> git.lizzy.rs Git - rust.git/blob - tests/ui/assign_ops2.stderr
Merge pull request #2984 from flip1995/single_char_pattern
[rust.git] / tests / ui / assign_ops2.stderr
1 error: variable appears on both sides of an assignment operation
2  --> $DIR/assign_ops2.rs:8:5
3   |
4 8 |     a += a + 1;
5   |     ^^^^^^^^^^
6   |
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   |     ^^^^^^
12 help: or
13   |
14 8 |     a = a + a + 1;
15   |     ^^^^^^^^^^^^^
16
17 error: variable appears on both sides of an assignment operation
18  --> $DIR/assign_ops2.rs:9:5
19   |
20 9 |     a += 1 + a;
21   |     ^^^^^^^^^^
22 help: Did you mean a = a + 1 or a = a + 1 + a? Consider replacing it with
23   |
24 9 |     a += 1;
25   |     ^^^^^^
26 help: or
27   |
28 9 |     a = a + 1 + a;
29   |     ^^^^^^^^^^^^^
30
31 error: variable appears on both sides of an assignment operation
32   --> $DIR/assign_ops2.rs:10:5
33    |
34 10 |     a -= a - 1;
35    |     ^^^^^^^^^^
36 help: Did you mean a = a - 1 or a = a - (a - 1)? Consider replacing it with
37    |
38 10 |     a -= 1;
39    |     ^^^^^^
40 help: or
41    |
42 10 |     a = a - (a - 1);
43    |     ^^^^^^^^^^^^^^^
44
45 error: variable appears on both sides of an assignment operation
46   --> $DIR/assign_ops2.rs:11:5
47    |
48 11 |     a *= a * 99;
49    |     ^^^^^^^^^^^
50 help: Did you mean a = a * 99 or a = a * a * 99? Consider replacing it with
51    |
52 11 |     a *= 99;
53    |     ^^^^^^^
54 help: or
55    |
56 11 |     a = a * a * 99;
57    |     ^^^^^^^^^^^^^^
58
59 error: variable appears on both sides of an assignment operation
60   --> $DIR/assign_ops2.rs:12:5
61    |
62 12 |     a *= 42 * a;
63    |     ^^^^^^^^^^^
64 help: Did you mean a = a * 42 or a = a * 42 * a? Consider replacing it with
65    |
66 12 |     a *= 42;
67    |     ^^^^^^^
68 help: or
69    |
70 12 |     a = a * 42 * a;
71    |     ^^^^^^^^^^^^^^
72
73 error: variable appears on both sides of an assignment operation
74   --> $DIR/assign_ops2.rs:13:5
75    |
76 13 |     a /= a / 2;
77    |     ^^^^^^^^^^
78 help: Did you mean a = a / 2 or a = a / (a / 2)? Consider replacing it with
79    |
80 13 |     a /= 2;
81    |     ^^^^^^
82 help: or
83    |
84 13 |     a = a / (a / 2);
85    |     ^^^^^^^^^^^^^^^
86
87 error: variable appears on both sides of an assignment operation
88   --> $DIR/assign_ops2.rs:14:5
89    |
90 14 |     a %= a % 5;
91    |     ^^^^^^^^^^
92 help: Did you mean a = a % 5 or a = a % (a % 5)? Consider replacing it with
93    |
94 14 |     a %= 5;
95    |     ^^^^^^
96 help: or
97    |
98 14 |     a = a % (a % 5);
99    |     ^^^^^^^^^^^^^^^
100
101 error: variable appears on both sides of an assignment operation
102   --> $DIR/assign_ops2.rs:15:5
103    |
104 15 |     a &= a & 1;
105    |     ^^^^^^^^^^
106 help: Did you mean a = a & 1 or a = a & a & 1? Consider replacing it with
107    |
108 15 |     a &= 1;
109    |     ^^^^^^
110 help: or
111    |
112 15 |     a = a & a & 1;
113    |     ^^^^^^^^^^^^^
114
115 error: variable appears on both sides of an assignment operation
116   --> $DIR/assign_ops2.rs:16:5
117    |
118 16 |     a *= a * a;
119    |     ^^^^^^^^^^
120 help: Did you mean a = a * a or a = a * a * a? Consider replacing it with
121    |
122 16 |     a *= a;
123    |     ^^^^^^
124 help: or
125    |
126 16 |     a = a * a * a;
127    |     ^^^^^^^^^^^^^
128
129 error: aborting due to 9 previous errors
130