@@ -35,6 +35,7 @@ macro_rules! sh_impl_signed {
35
35
* self = * self << other;
36
36
}
37
37
}
38
+ forward_ref_op_assign! { impl ShlAssign , shl_assign for Wrapping <$t>, $f }
38
39
39
40
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
40
41
impl Shr <$f> for Wrapping <$t> {
@@ -57,6 +58,7 @@ macro_rules! sh_impl_signed {
57
58
* self = * self >> other;
58
59
}
59
60
}
61
+ forward_ref_op_assign! { impl ShrAssign , shr_assign for Wrapping <$t>, $f }
60
62
)
61
63
}
62
64
@@ -79,6 +81,7 @@ macro_rules! sh_impl_unsigned {
79
81
* self = * self << other;
80
82
}
81
83
}
84
+ forward_ref_op_assign! { impl ShlAssign , shl_assign for Wrapping <$t>, $f }
82
85
83
86
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
84
87
impl Shr <$f> for Wrapping <$t> {
@@ -97,6 +100,7 @@ macro_rules! sh_impl_unsigned {
97
100
* self = * self >> other;
98
101
}
99
102
}
103
+ forward_ref_op_assign! { impl ShrAssign , shr_assign for Wrapping <$t>, $f }
100
104
)
101
105
}
102
106
@@ -141,6 +145,7 @@ macro_rules! wrapping_impl {
141
145
* self = * self + other;
142
146
}
143
147
}
148
+ forward_ref_op_assign! { impl AddAssign , add_assign for Wrapping <$t>, Wrapping <$t> }
144
149
145
150
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
146
151
impl Sub for Wrapping <$t> {
@@ -161,6 +166,7 @@ macro_rules! wrapping_impl {
161
166
* self = * self - other;
162
167
}
163
168
}
169
+ forward_ref_op_assign! { impl SubAssign , sub_assign for Wrapping <$t>, Wrapping <$t> }
164
170
165
171
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
166
172
impl Mul for Wrapping <$t> {
@@ -181,6 +187,7 @@ macro_rules! wrapping_impl {
181
187
* self = * self * other;
182
188
}
183
189
}
190
+ forward_ref_op_assign! { impl MulAssign , mul_assign for Wrapping <$t>, Wrapping <$t> }
184
191
185
192
#[ stable( feature = "wrapping_div" , since = "1.3.0" ) ]
186
193
impl Div for Wrapping <$t> {
@@ -201,6 +208,7 @@ macro_rules! wrapping_impl {
201
208
* self = * self / other;
202
209
}
203
210
}
211
+ forward_ref_op_assign! { impl DivAssign , div_assign for Wrapping <$t>, Wrapping <$t> }
204
212
205
213
#[ stable( feature = "wrapping_impls" , since = "1.7.0" ) ]
206
214
impl Rem for Wrapping <$t> {
@@ -221,6 +229,7 @@ macro_rules! wrapping_impl {
221
229
* self = * self % other;
222
230
}
223
231
}
232
+ forward_ref_op_assign! { impl RemAssign , rem_assign for Wrapping <$t>, Wrapping <$t> }
224
233
225
234
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
226
235
impl Not for Wrapping <$t> {
@@ -253,6 +262,7 @@ macro_rules! wrapping_impl {
253
262
* self = * self ^ other;
254
263
}
255
264
}
265
+ forward_ref_op_assign! { impl BitXorAssign , bitxor_assign for Wrapping <$t>, Wrapping <$t> }
256
266
257
267
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
258
268
impl BitOr for Wrapping <$t> {
@@ -273,6 +283,7 @@ macro_rules! wrapping_impl {
273
283
* self = * self | other;
274
284
}
275
285
}
286
+ forward_ref_op_assign! { impl BitOrAssign , bitor_assign for Wrapping <$t>, Wrapping <$t> }
276
287
277
288
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
278
289
impl BitAnd for Wrapping <$t> {
@@ -293,6 +304,7 @@ macro_rules! wrapping_impl {
293
304
* self = * self & other;
294
305
}
295
306
}
307
+ forward_ref_op_assign! { impl BitAndAssign , bitand_assign for Wrapping <$t>, Wrapping <$t> }
296
308
297
309
#[ stable( feature = "wrapping_neg" , since = "1.10.0" ) ]
298
310
impl Neg for Wrapping <$t> {
0 commit comments