11use crate :: convert:: TryFrom ;
2- use crate :: marker:: Destruct ;
32use crate :: mem;
43use crate :: num:: NonZeroUsize ;
54use crate :: ops:: { self , Try } ;
@@ -22,8 +21,7 @@ unsafe_impl_trusted_step![char i8 i16 i32 i64 i128 isize u8 u16 u32 u64 u128 usi
2221/// The *successor* operation moves towards values that compare greater.
2322/// The *predecessor* operation moves towards values that compare lesser.
2423#[ unstable( feature = "step_trait" , reason = "recently redesigned" , issue = "42168" ) ]
25- #[ const_trait]
26- pub trait Step : ~const Clone + ~const PartialOrd + Sized {
24+ pub trait Step : Clone + PartialOrd + Sized {
2725 /// Returns the number of *successor* steps required to get from `start` to `end`.
2826 ///
2927 /// Returns `None` if the number of steps would overflow `usize`
@@ -237,8 +235,7 @@ macro_rules! step_integer_impls {
237235 $(
238236 #[ allow( unreachable_patterns) ]
239237 #[ unstable( feature = "step_trait" , reason = "recently redesigned" , issue = "42168" ) ]
240- #[ rustc_const_unstable( feature = "const_iter" , issue = "92476" ) ]
241- impl const Step for $u_narrower {
238+ impl Step for $u_narrower {
242239 step_identical_methods!( ) ;
243240
244241 #[ inline]
@@ -270,8 +267,7 @@ macro_rules! step_integer_impls {
270267
271268 #[ allow( unreachable_patterns) ]
272269 #[ unstable( feature = "step_trait" , reason = "recently redesigned" , issue = "42168" ) ]
273- #[ rustc_const_unstable( feature = "const_iter" , issue = "92476" ) ]
274- impl const Step for $i_narrower {
270+ impl Step for $i_narrower {
275271 step_identical_methods!( ) ;
276272
277273 #[ inline]
@@ -335,8 +331,7 @@ macro_rules! step_integer_impls {
335331 $(
336332 #[ allow( unreachable_patterns) ]
337333 #[ unstable( feature = "step_trait" , reason = "recently redesigned" , issue = "42168" ) ]
338- #[ rustc_const_unstable( feature = "const_iter" , issue = "92476" ) ]
339- impl const Step for $u_wider {
334+ impl Step for $u_wider {
340335 step_identical_methods!( ) ;
341336
342337 #[ inline]
@@ -361,8 +356,7 @@ macro_rules! step_integer_impls {
361356
362357 #[ allow( unreachable_patterns) ]
363358 #[ unstable( feature = "step_trait" , reason = "recently redesigned" , issue = "42168" ) ]
364- #[ rustc_const_unstable( feature = "const_iter" , issue = "92476" ) ]
365- impl const Step for $i_wider {
359+ impl Step for $i_wider {
366360 step_identical_methods!( ) ;
367361
368362 #[ inline]
@@ -412,8 +406,7 @@ step_integer_impls! {
412406}
413407
414408#[ unstable( feature = "step_trait" , reason = "recently redesigned" , issue = "42168" ) ]
415- #[ rustc_const_unstable( feature = "const_iter" , issue = "92476" ) ]
416- impl const Step for char {
409+ impl Step for char {
417410 #[ inline]
418411 fn steps_between ( & start: & char , & end: & char ) -> Option < usize > {
419412 let start = start as u32 ;
@@ -431,7 +424,6 @@ impl const Step for char {
431424 }
432425
433426 #[ inline]
434- #[ rustc_allow_const_fn_unstable( const_try) ]
435427 fn forward_checked ( start : char , count : usize ) -> Option < char > {
436428 let start = start as u32 ;
437429 let mut res = Step :: forward_checked ( start, count) ?;
@@ -448,7 +440,6 @@ impl const Step for char {
448440 }
449441
450442 #[ inline]
451- #[ rustc_allow_const_fn_unstable( const_try) ]
452443 fn backward_checked ( start : char , count : usize ) -> Option < char > {
453444 let start = start as u32 ;
454445 let mut res = Step :: backward_checked ( start, count) ?;
@@ -524,7 +515,6 @@ macro_rules! range_incl_exact_iter_impl {
524515}
525516
526517/// Specialization implementations for `Range`.
527- #[ const_trait]
528518trait RangeIteratorImpl {
529519 type Item ;
530520
@@ -539,7 +529,7 @@ trait RangeIteratorImpl {
539529 fn spec_advance_back_by ( & mut self , n : usize ) -> Result < ( ) , NonZeroUsize > ;
540530}
541531
542- impl < A : ~ const Step + ~ const Destruct > const RangeIteratorImpl for ops:: Range < A > {
532+ impl < A : Step > RangeIteratorImpl for ops:: Range < A > {
543533 type Item = A ;
544534
545535 #[ inline]
@@ -625,7 +615,7 @@ impl<A: ~const Step + ~const Destruct> const RangeIteratorImpl for ops::Range<A>
625615 }
626616}
627617
628- impl < T : ~ const TrustedStep + ~ const Destruct > const RangeIteratorImpl for ops:: Range < T > {
618+ impl < T : TrustedStep > RangeIteratorImpl for ops:: Range < T > {
629619 #[ inline]
630620 fn spec_next ( & mut self ) -> Option < T > {
631621 if self . start < self . end {
@@ -713,8 +703,7 @@ impl<T: ~const TrustedStep + ~const Destruct> const RangeIteratorImpl for ops::R
713703}
714704
715705#[ stable( feature = "rust1" , since = "1.0.0" ) ]
716- #[ rustc_const_unstable( feature = "const_iter" , issue = "92476" ) ]
717- impl < A : ~const Step + ~const Destruct > const Iterator for ops:: Range < A > {
706+ impl < A : Step > Iterator for ops:: Range < A > {
718707 type Item = A ;
719708
720709 #[ inline]
@@ -824,8 +813,7 @@ range_incl_exact_iter_impl! {
824813}
825814
826815#[ stable( feature = "rust1" , since = "1.0.0" ) ]
827- #[ rustc_const_unstable( feature = "const_iter" , issue = "92476" ) ]
828- impl < A : ~const Step + ~const Destruct > const DoubleEndedIterator for ops:: Range < A > {
816+ impl < A : Step > DoubleEndedIterator for ops:: Range < A > {
829817 #[ inline]
830818 fn next_back ( & mut self ) -> Option < A > {
831819 self . spec_next_back ( )
0 commit comments