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