@@ -140,6 +140,7 @@ macro_rules! sh_impl_all {
140
140
141
141
sh_impl_all ! { u8 u16 u32 u64 usize i8 i16 i32 i64 isize }
142
142
143
+ // FIXME(30524): impl Op<T> for Wrapping<T>, impl OpAssign<T> for Wrapping<T>
143
144
macro_rules! wrapping_impl {
144
145
( $( $t: ty) * ) => ( $(
145
146
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
@@ -152,16 +153,6 @@ macro_rules! wrapping_impl {
152
153
}
153
154
}
154
155
155
- #[ unstable( feature = "wrapping_impls" , reason = "recently added" , issue = "30524" ) ]
156
- impl Add <$t> for Wrapping <$t> {
157
- type Output = Wrapping <$t>;
158
-
159
- #[ inline( always) ]
160
- fn add( self , other: $t) -> Wrapping <$t> {
161
- self + Wrapping ( other)
162
- }
163
- }
164
-
165
156
#[ unstable( feature = "op_assign_traits" , reason = "recently added" , issue = "28235" ) ]
166
157
impl AddAssign for Wrapping <$t> {
167
158
#[ inline( always) ]
@@ -170,14 +161,6 @@ macro_rules! wrapping_impl {
170
161
}
171
162
}
172
163
173
- #[ unstable( feature = "wrapping_impls" , reason = "recently added" , issue = "30524" ) ]
174
- impl AddAssign <$t> for Wrapping <$t> {
175
- #[ inline( always) ]
176
- fn add_assign( & mut self , other: $t) {
177
- self . add_assign( Wrapping ( other) )
178
- }
179
- }
180
-
181
164
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
182
165
impl Sub for Wrapping <$t> {
183
166
type Output = Wrapping <$t>;
@@ -188,16 +171,6 @@ macro_rules! wrapping_impl {
188
171
}
189
172
}
190
173
191
- #[ unstable( feature = "wrapping_impls" , reason = "recently added" , issue = "30524" ) ]
192
- impl Sub <$t> for Wrapping <$t> {
193
- type Output = Wrapping <$t>;
194
-
195
- #[ inline( always) ]
196
- fn sub( self , other: $t) -> Wrapping <$t> {
197
- self - Wrapping ( other)
198
- }
199
- }
200
-
201
174
#[ unstable( feature = "op_assign_traits" , reason = "recently added" , issue = "28235" ) ]
202
175
impl SubAssign for Wrapping <$t> {
203
176
#[ inline( always) ]
@@ -206,14 +179,6 @@ macro_rules! wrapping_impl {
206
179
}
207
180
}
208
181
209
- #[ unstable( feature = "wrapping_impls" , reason = "recently added" , issue = "30524" ) ]
210
- impl SubAssign <$t> for Wrapping <$t> {
211
- #[ inline( always) ]
212
- fn sub_assign( & mut self , other: $t) {
213
- self . sub_assign( Wrapping ( other) )
214
- }
215
- }
216
-
217
182
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
218
183
impl Mul for Wrapping <$t> {
219
184
type Output = Wrapping <$t>;
@@ -224,16 +189,6 @@ macro_rules! wrapping_impl {
224
189
}
225
190
}
226
191
227
- #[ unstable( feature = "wrapping_impls" , reason = "recently added" , issue = "30524" ) ]
228
- impl Mul <$t> for Wrapping <$t> {
229
- type Output = Wrapping <$t>;
230
-
231
- #[ inline( always) ]
232
- fn mul( self , other: $t) -> Wrapping <$t> {
233
- self * Wrapping ( other)
234
- }
235
- }
236
-
237
192
#[ unstable( feature = "op_assign_traits" , reason = "recently added" , issue = "28235" ) ]
238
193
impl MulAssign for Wrapping <$t> {
239
194
#[ inline( always) ]
@@ -242,14 +197,6 @@ macro_rules! wrapping_impl {
242
197
}
243
198
}
244
199
245
- #[ unstable( feature = "wrapping_impls" , reason = "recently added" , issue = "30524" ) ]
246
- impl MulAssign <$t> for Wrapping <$t> {
247
- #[ inline( always) ]
248
- fn mul_assign( & mut self , other: $t) {
249
- self . mul_assign( Wrapping ( other) )
250
- }
251
- }
252
-
253
200
#[ stable( feature = "wrapping_div" , since = "1.3.0" ) ]
254
201
impl Div for Wrapping <$t> {
255
202
type Output = Wrapping <$t>;
@@ -260,16 +207,6 @@ macro_rules! wrapping_impl {
260
207
}
261
208
}
262
209
263
- #[ unstable( feature = "wrapping_impls" , reason = "recently added" , issue = "30524" ) ]
264
- impl Div <$t> for Wrapping <$t> {
265
- type Output = Wrapping <$t>;
266
-
267
- #[ inline( always) ]
268
- fn div( self , other: $t) -> Wrapping <$t> {
269
- self / Wrapping ( other)
270
- }
271
- }
272
-
273
210
#[ unstable( feature = "op_assign_traits" , reason = "recently added" , issue = "28235" ) ]
274
211
impl DivAssign for Wrapping <$t> {
275
212
#[ inline( always) ]
@@ -278,14 +215,6 @@ macro_rules! wrapping_impl {
278
215
}
279
216
}
280
217
281
- #[ unstable( feature = "wrapping_impls" , reason = "recently added" , issue = "30524" ) ]
282
- impl DivAssign <$t> for Wrapping <$t> {
283
- #[ inline( always) ]
284
- fn div_assign( & mut self , other: $t) {
285
- self . div_assign( Wrapping ( other) )
286
- }
287
- }
288
-
289
218
#[ unstable( feature = "wrapping_impls" , reason = "recently added" , issue = "30524" ) ]
290
219
impl Rem for Wrapping <$t> {
291
220
type Output = Wrapping <$t>;
@@ -296,16 +225,6 @@ macro_rules! wrapping_impl {
296
225
}
297
226
}
298
227
299
- #[ unstable( feature = "wrapping_impls" , reason = "recently added" , issue = "30524" ) ]
300
- impl Rem <$t> for Wrapping <$t> {
301
- type Output = Wrapping <$t>;
302
-
303
- #[ inline( always) ]
304
- fn rem( self , other: $t) -> Wrapping <$t> {
305
- self % Wrapping ( other)
306
- }
307
- }
308
-
309
228
#[ unstable( feature = "op_assign_traits" , reason = "recently added" , issue = "28235" ) ]
310
229
impl RemAssign for Wrapping <$t> {
311
230
#[ inline( always) ]
@@ -314,14 +233,6 @@ macro_rules! wrapping_impl {
314
233
}
315
234
}
316
235
317
- #[ unstable( feature = "wrapping_impls" , reason = "recently added" , issue = "30524" ) ]
318
- impl RemAssign <$t> for Wrapping <$t> {
319
- #[ inline( always) ]
320
- fn rem_assign( & mut self , other: $t) {
321
- self . rem_assign( Wrapping ( other) )
322
- }
323
- }
324
-
325
236
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
326
237
impl Not for Wrapping <$t> {
327
238
type Output = Wrapping <$t>;
@@ -342,16 +253,6 @@ macro_rules! wrapping_impl {
342
253
}
343
254
}
344
255
345
- #[ unstable( feature = "wrapping_impls" , reason = "recently added" , issue = "30524" ) ]
346
- impl BitXor <$t> for Wrapping <$t> {
347
- type Output = Wrapping <$t>;
348
-
349
- #[ inline( always) ]
350
- fn bitxor( self , other: $t) -> Wrapping <$t> {
351
- self ^ Wrapping ( other)
352
- }
353
- }
354
-
355
256
#[ unstable( feature = "op_assign_traits" , reason = "recently added" , issue = "28235" ) ]
356
257
impl BitXorAssign for Wrapping <$t> {
357
258
#[ inline( always) ]
@@ -360,14 +261,6 @@ macro_rules! wrapping_impl {
360
261
}
361
262
}
362
263
363
- #[ unstable( feature = "wrapping_impls" , reason = "recently added" , issue = "30524" ) ]
364
- impl BitXorAssign <$t> for Wrapping <$t> {
365
- #[ inline( always) ]
366
- fn bitxor_assign( & mut self , other: $t) {
367
- self . bitxor_assign( Wrapping ( other) )
368
- }
369
- }
370
-
371
264
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
372
265
impl BitOr for Wrapping <$t> {
373
266
type Output = Wrapping <$t>;
@@ -378,16 +271,6 @@ macro_rules! wrapping_impl {
378
271
}
379
272
}
380
273
381
- #[ unstable( feature = "wrapping_impls" , reason = "recently added" , issue = "30524" ) ]
382
- impl BitOr <$t> for Wrapping <$t> {
383
- type Output = Wrapping <$t>;
384
-
385
- #[ inline( always) ]
386
- fn bitor( self , other: $t) -> Wrapping <$t> {
387
- self | Wrapping ( other)
388
- }
389
- }
390
-
391
274
#[ unstable( feature = "op_assign_traits" , reason = "recently added" , issue = "28235" ) ]
392
275
impl BitOrAssign for Wrapping <$t> {
393
276
#[ inline( always) ]
@@ -396,14 +279,6 @@ macro_rules! wrapping_impl {
396
279
}
397
280
}
398
281
399
- #[ unstable( feature = "wrapping_impls" , reason = "recently added" , issue = "30524" ) ]
400
- impl BitOrAssign <$t> for Wrapping <$t> {
401
- #[ inline( always) ]
402
- fn bitor_assign( & mut self , other: $t) {
403
- self . bitor_assign( Wrapping ( other) )
404
- }
405
- }
406
-
407
282
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
408
283
impl BitAnd for Wrapping <$t> {
409
284
type Output = Wrapping <$t>;
@@ -414,31 +289,13 @@ macro_rules! wrapping_impl {
414
289
}
415
290
}
416
291
417
- #[ unstable( feature = "wrapping_impls" , reason = "recently added" , issue = "30524" ) ]
418
- impl BitAnd <$t> for Wrapping <$t> {
419
- type Output = Wrapping <$t>;
420
-
421
- #[ inline( always) ]
422
- fn bitand( self , other: $t) -> Wrapping <$t> {
423
- self & Wrapping ( other)
424
- }
425
- }
426
-
427
292
#[ unstable( feature = "op_assign_traits" , reason = "recently added" , issue = "28235" ) ]
428
293
impl BitAndAssign for Wrapping <$t> {
429
294
#[ inline( always) ]
430
295
fn bitand_assign( & mut self , other: Wrapping <$t>) {
431
296
* self = * self & other;
432
297
}
433
298
}
434
-
435
- #[ unstable( feature = "wrapping_impls" , reason = "recently added" , issue = "30524" ) ]
436
- impl BitAndAssign <$t> for Wrapping <$t> {
437
- #[ inline( always) ]
438
- fn bitand_assign( & mut self , other: $t) {
439
- self . bitand_assign( Wrapping ( other) )
440
- }
441
- }
442
299
) * )
443
300
}
444
301
0 commit comments