@@ -252,6 +252,9 @@ step_impl_no_between!(u128 i128);
252252#[ derive( Clone , Debug ) ]
253253#[ unstable( feature = "step_by" , reason = "recent addition" ,
254254 issue = "27741" ) ]
255+ #[ rustc_deprecated( since = "1.19.0" ,
256+ reason = "replaced by `iter::StepBy`" ) ]
257+ #[ allow( deprecated) ]
255258pub struct StepBy < A , R > {
256259 step_by : A ,
257260 range : R ,
@@ -274,6 +277,7 @@ impl<A: Step> ops::RangeFrom<A> {
274277 issue = "27741" ) ]
275278 #[ rustc_deprecated( since = "1.19.0" ,
276279 reason = "replaced by `Iterator::step_by`" ) ]
280+ #[ allow( deprecated) ]
277281 pub fn step_by ( self , by : A ) -> StepBy < A , Self > {
278282 StepBy {
279283 step_by : by,
@@ -301,6 +305,7 @@ impl<A: Step> ops::Range<A> {
301305 issue = "27741" ) ]
302306 #[ rustc_deprecated( since = "1.19.0" ,
303307 reason = "replaced by `Iterator::step_by`" ) ]
308+ #[ allow( deprecated) ]
304309 pub fn step_by ( self , by : A ) -> StepBy < A , Self > {
305310 StepBy {
306311 step_by : by,
@@ -327,6 +332,7 @@ impl<A: Step> ops::RangeInclusive<A> {
327332 issue = "27741" ) ]
328333 #[ rustc_deprecated( since = "1.19.0" ,
329334 reason = "replaced by `Iterator::step_by`" ) ]
335+ #[ allow( deprecated) ]
330336 pub fn step_by ( self , by : A ) -> StepBy < A , Self > {
331337 StepBy {
332338 step_by : by,
@@ -337,6 +343,7 @@ impl<A: Step> ops::RangeInclusive<A> {
337343
338344#[ unstable( feature = "step_by" , reason = "recent addition" ,
339345 issue = "27741" ) ]
346+ #[ allow( deprecated) ]
340347impl < A > Iterator for StepBy < A , ops:: RangeFrom < A > > where
341348 A : Clone ,
342349 for < ' a > & ' a A : Add < & ' a A , Output = A >
@@ -357,11 +364,13 @@ impl<A> Iterator for StepBy<A, ops::RangeFrom<A>> where
357364}
358365
359366#[ unstable( feature = "fused" , issue = "35602" ) ]
367+ #[ allow( deprecated) ]
360368impl < A > FusedIterator for StepBy < A , ops:: RangeFrom < A > >
361369 where A : Clone , for < ' a > & ' a A : Add < & ' a A , Output = A > { }
362370
363371#[ unstable( feature = "step_by" , reason = "recent addition" ,
364372 issue = "27741" ) ]
373+ #[ allow( deprecated) ]
365374impl < A : Step + Clone > Iterator for StepBy < A , ops:: Range < A > > {
366375 type Item = A ;
367376
@@ -399,11 +408,13 @@ impl<A: Step + Clone> Iterator for StepBy<A, ops::Range<A>> {
399408}
400409
401410#[ unstable( feature = "fused" , issue = "35602" ) ]
411+ #[ allow( deprecated) ]
402412impl < A : Step + Clone > FusedIterator for StepBy < A , ops:: Range < A > > { }
403413
404414#[ unstable( feature = "inclusive_range" ,
405415 reason = "recently added, follows RFC" ,
406416 issue = "28237" ) ]
417+ #[ allow( deprecated) ]
407418impl < A : Step + Clone > Iterator for StepBy < A , ops:: RangeInclusive < A > > {
408419 type Item = A ;
409420
@@ -443,6 +454,7 @@ impl<A: Step + Clone> Iterator for StepBy<A, ops::RangeInclusive<A>> {
443454}
444455
445456#[ unstable( feature = "fused" , issue = "35602" ) ]
457+ #[ allow( deprecated) ]
446458impl < A : Step + Clone > FusedIterator for StepBy < A , ops:: RangeInclusive < A > > { }
447459
448460macro_rules! range_exact_iter_impl {
0 commit comments