@@ -21,8 +21,7 @@ unsafe_impl_trusted_step![char i8 i16 i32 i64 i128 isize u8 u16 u32 u64 u128 usi
21
21
/// The *successor* operation moves towards values that compare greater.
22
22
/// The *predecessor* operation moves towards values that compare lesser.
23
23
#[ unstable( feature = "step_trait" , reason = "recently redesigned" , issue = "42168" ) ]
24
- #[ const_trait]
25
- pub trait Step : ~const Clone + ~const PartialOrd + Sized {
24
+ pub trait Step : Clone + PartialOrd + Sized {
26
25
/// Returns the number of *successor* steps required to get from `start` to `end`.
27
26
///
28
27
/// Returns `None` if the number of steps would overflow `usize`
@@ -236,8 +235,7 @@ macro_rules! step_integer_impls {
236
235
$(
237
236
#[ allow( unreachable_patterns) ]
238
237
#[ unstable( feature = "step_trait" , reason = "recently redesigned" , issue = "42168" ) ]
239
- #[ rustc_const_unstable( feature = "const_iter" , issue = "92476" ) ]
240
- impl const Step for $u_narrower {
238
+ impl Step for $u_narrower {
241
239
step_identical_methods!( ) ;
242
240
243
241
#[ inline]
@@ -269,8 +267,7 @@ macro_rules! step_integer_impls {
269
267
270
268
#[ allow( unreachable_patterns) ]
271
269
#[ unstable( feature = "step_trait" , reason = "recently redesigned" , issue = "42168" ) ]
272
- #[ rustc_const_unstable( feature = "const_iter" , issue = "92476" ) ]
273
- impl const Step for $i_narrower {
270
+ impl Step for $i_narrower {
274
271
step_identical_methods!( ) ;
275
272
276
273
#[ inline]
@@ -334,8 +331,7 @@ macro_rules! step_integer_impls {
334
331
$(
335
332
#[ allow( unreachable_patterns) ]
336
333
#[ unstable( feature = "step_trait" , reason = "recently redesigned" , issue = "42168" ) ]
337
- #[ rustc_const_unstable( feature = "const_iter" , issue = "92476" ) ]
338
- impl const Step for $u_wider {
334
+ impl Step for $u_wider {
339
335
step_identical_methods!( ) ;
340
336
341
337
#[ inline]
@@ -360,8 +356,7 @@ macro_rules! step_integer_impls {
360
356
361
357
#[ allow( unreachable_patterns) ]
362
358
#[ unstable( feature = "step_trait" , reason = "recently redesigned" , issue = "42168" ) ]
363
- #[ rustc_const_unstable( feature = "const_iter" , issue = "92476" ) ]
364
- impl const Step for $i_wider {
359
+ impl Step for $i_wider {
365
360
step_identical_methods!( ) ;
366
361
367
362
#[ inline]
@@ -411,8 +406,7 @@ step_integer_impls! {
411
406
}
412
407
413
408
#[ unstable( feature = "step_trait" , reason = "recently redesigned" , issue = "42168" ) ]
414
- #[ rustc_const_unstable( feature = "const_iter" , issue = "92476" ) ]
415
- impl const Step for char {
409
+ impl Step for char {
416
410
#[ inline]
417
411
fn steps_between ( & start: & char , & end: & char ) -> Option < usize > {
418
412
let start = start as u32 ;
@@ -430,7 +424,6 @@ impl const Step for char {
430
424
}
431
425
432
426
#[ inline]
433
- #[ rustc_allow_const_fn_unstable( const_try) ]
434
427
fn forward_checked ( start : char , count : usize ) -> Option < char > {
435
428
let start = start as u32 ;
436
429
let mut res = Step :: forward_checked ( start, count) ?;
@@ -447,7 +440,6 @@ impl const Step for char {
447
440
}
448
441
449
442
#[ inline]
450
- #[ rustc_allow_const_fn_unstable( const_try) ]
451
443
fn backward_checked ( start : char , count : usize ) -> Option < char > {
452
444
let start = start as u32 ;
453
445
let mut res = Step :: backward_checked ( start, count) ?;
0 commit comments