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