@@ -252,6 +252,9 @@ step_impl_no_between!(u128 i128);
252
252
#[ derive( Clone , Debug ) ]
253
253
#[ unstable( feature = "step_by" , reason = "recent addition" ,
254
254
issue = "27741" ) ]
255
+ #[ rustc_deprecated( since = "1.19.0" ,
256
+ reason = "replaced by `iter::StepBy`" ) ]
257
+ #[ allow( deprecated) ]
255
258
pub struct StepBy < A , R > {
256
259
step_by : A ,
257
260
range : R ,
@@ -272,6 +275,9 @@ impl<A: Step> ops::RangeFrom<A> {
272
275
/// ```
273
276
#[ unstable( feature = "step_by" , reason = "recent addition" ,
274
277
issue = "27741" ) ]
278
+ #[ rustc_deprecated( since = "1.19.0" ,
279
+ reason = "replaced by `Iterator::step_by`" ) ]
280
+ #[ allow( deprecated) ]
275
281
pub fn step_by ( self , by : A ) -> StepBy < A , Self > {
276
282
StepBy {
277
283
step_by : by,
@@ -297,6 +303,9 @@ impl<A: Step> ops::Range<A> {
297
303
/// ```
298
304
#[ unstable( feature = "step_by" , reason = "recent addition" ,
299
305
issue = "27741" ) ]
306
+ #[ rustc_deprecated( since = "1.19.0" ,
307
+ reason = "replaced by `Iterator::step_by`" ) ]
308
+ #[ allow( deprecated) ]
300
309
pub fn step_by ( self , by : A ) -> StepBy < A , Self > {
301
310
StepBy {
302
311
step_by : by,
@@ -321,6 +330,9 @@ impl<A: Step> ops::RangeInclusive<A> {
321
330
/// ```
322
331
#[ unstable( feature = "step_by" , reason = "recent addition" ,
323
332
issue = "27741" ) ]
333
+ #[ rustc_deprecated( since = "1.19.0" ,
334
+ reason = "replaced by `Iterator::step_by`" ) ]
335
+ #[ allow( deprecated) ]
324
336
pub fn step_by ( self , by : A ) -> StepBy < A , Self > {
325
337
StepBy {
326
338
step_by : by,
@@ -331,6 +343,7 @@ impl<A: Step> ops::RangeInclusive<A> {
331
343
332
344
#[ unstable( feature = "step_by" , reason = "recent addition" ,
333
345
issue = "27741" ) ]
346
+ #[ allow( deprecated) ]
334
347
impl < A > Iterator for StepBy < A , ops:: RangeFrom < A > > where
335
348
A : Clone ,
336
349
for < ' a > & ' a A : Add < & ' a A , Output = A >
@@ -351,11 +364,13 @@ impl<A> Iterator for StepBy<A, ops::RangeFrom<A>> where
351
364
}
352
365
353
366
#[ unstable( feature = "fused" , issue = "35602" ) ]
367
+ #[ allow( deprecated) ]
354
368
impl < A > FusedIterator for StepBy < A , ops:: RangeFrom < A > >
355
369
where A : Clone , for < ' a > & ' a A : Add < & ' a A , Output = A > { }
356
370
357
371
#[ unstable( feature = "step_by" , reason = "recent addition" ,
358
372
issue = "27741" ) ]
373
+ #[ allow( deprecated) ]
359
374
impl < A : Step + Clone > Iterator for StepBy < A , ops:: Range < A > > {
360
375
type Item = A ;
361
376
@@ -393,11 +408,13 @@ impl<A: Step + Clone> Iterator for StepBy<A, ops::Range<A>> {
393
408
}
394
409
395
410
#[ unstable( feature = "fused" , issue = "35602" ) ]
411
+ #[ allow( deprecated) ]
396
412
impl < A : Step + Clone > FusedIterator for StepBy < A , ops:: Range < A > > { }
397
413
398
414
#[ unstable( feature = "inclusive_range" ,
399
415
reason = "recently added, follows RFC" ,
400
416
issue = "28237" ) ]
417
+ #[ allow( deprecated) ]
401
418
impl < A : Step + Clone > Iterator for StepBy < A , ops:: RangeInclusive < A > > {
402
419
type Item = A ;
403
420
@@ -437,6 +454,7 @@ impl<A: Step + Clone> Iterator for StepBy<A, ops::RangeInclusive<A>> {
437
454
}
438
455
439
456
#[ unstable( feature = "fused" , issue = "35602" ) ]
457
+ #[ allow( deprecated) ]
440
458
impl < A : Step + Clone > FusedIterator for StepBy < A , ops:: RangeInclusive < A > > { }
441
459
442
460
macro_rules! range_exact_iter_impl {
0 commit comments