@@ -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 ,
@@ -272,6 +275,9 @@ impl<A: Step> ops::RangeFrom<A> {
272275 /// ```
273276 #[ unstable( feature = "step_by" , reason = "recent addition" ,
274277 issue = "27741" ) ]
278+ #[ rustc_deprecated( since = "1.19.0" ,
279+ reason = "replaced by `Iterator::step_by`" ) ]
280+ #[ allow( deprecated) ]
275281 pub fn step_by ( self , by : A ) -> StepBy < A , Self > {
276282 StepBy {
277283 step_by : by,
@@ -297,6 +303,9 @@ impl<A: Step> ops::Range<A> {
297303 /// ```
298304 #[ unstable( feature = "step_by" , reason = "recent addition" ,
299305 issue = "27741" ) ]
306+ #[ rustc_deprecated( since = "1.19.0" ,
307+ reason = "replaced by `Iterator::step_by`" ) ]
308+ #[ allow( deprecated) ]
300309 pub fn step_by ( self , by : A ) -> StepBy < A , Self > {
301310 StepBy {
302311 step_by : by,
@@ -321,6 +330,9 @@ impl<A: Step> ops::RangeInclusive<A> {
321330 /// ```
322331 #[ unstable( feature = "step_by" , reason = "recent addition" ,
323332 issue = "27741" ) ]
333+ #[ rustc_deprecated( since = "1.19.0" ,
334+ reason = "replaced by `Iterator::step_by`" ) ]
335+ #[ allow( deprecated) ]
324336 pub fn step_by ( self , by : A ) -> StepBy < A , Self > {
325337 StepBy {
326338 step_by : by,
@@ -331,6 +343,7 @@ impl<A: Step> ops::RangeInclusive<A> {
331343
332344#[ unstable( feature = "step_by" , reason = "recent addition" ,
333345 issue = "27741" ) ]
346+ #[ allow( deprecated) ]
334347impl < A > Iterator for StepBy < A , ops:: RangeFrom < A > > where
335348 A : Clone ,
336349 for < ' a > & ' a A : Add < & ' a A , Output = A >
@@ -351,11 +364,13 @@ impl<A> Iterator for StepBy<A, ops::RangeFrom<A>> where
351364}
352365
353366#[ unstable( feature = "fused" , issue = "35602" ) ]
367+ #[ allow( deprecated) ]
354368impl < A > FusedIterator for StepBy < A , ops:: RangeFrom < A > >
355369 where A : Clone , for < ' a > & ' a A : Add < & ' a A , Output = A > { }
356370
357371#[ unstable( feature = "step_by" , reason = "recent addition" ,
358372 issue = "27741" ) ]
373+ #[ allow( deprecated) ]
359374impl < A : Step + Clone > Iterator for StepBy < A , ops:: Range < A > > {
360375 type Item = A ;
361376
@@ -393,11 +408,13 @@ impl<A: Step + Clone> Iterator for StepBy<A, ops::Range<A>> {
393408}
394409
395410#[ unstable( feature = "fused" , issue = "35602" ) ]
411+ #[ allow( deprecated) ]
396412impl < A : Step + Clone > FusedIterator for StepBy < A , ops:: Range < A > > { }
397413
398414#[ unstable( feature = "inclusive_range" ,
399415 reason = "recently added, follows RFC" ,
400416 issue = "28237" ) ]
417+ #[ allow( deprecated) ]
401418impl < A : Step + Clone > Iterator for StepBy < A , ops:: RangeInclusive < A > > {
402419 type Item = A ;
403420
@@ -437,6 +454,7 @@ impl<A: Step + Clone> Iterator for StepBy<A, ops::RangeInclusive<A>> {
437454}
438455
439456#[ unstable( feature = "fused" , issue = "35602" ) ]
457+ #[ allow( deprecated) ]
440458impl < A : Step + Clone > FusedIterator for StepBy < A , ops:: RangeInclusive < A > > { }
441459
442460macro_rules! range_exact_iter_impl {
0 commit comments