@@ -5,7 +5,7 @@ use crate::ops;
5
5
use crate :: ptr;
6
6
7
7
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
8
- #[ rustc_const_unstable( feature = "const_slice_index_impls " , issue = "none" ) ]
8
+ #[ rustc_const_unstable( feature = "const_slice_index " , issue = "none" ) ]
9
9
impl < T , I > const ops:: Index < I > for [ T ]
10
10
where
11
11
I : ~const SliceIndex < [ T ] > ,
19
19
}
20
20
21
21
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
22
- #[ rustc_const_unstable( feature = "const_slice_index_impls " , issue = "none" ) ]
22
+ #[ rustc_const_unstable( feature = "const_slice_index " , issue = "none" ) ]
23
23
impl < T , I > const ops:: IndexMut < I > for [ T ]
24
24
where
25
25
I : ~const SliceIndex < [ T ] > ,
@@ -30,16 +30,19 @@ where
30
30
}
31
31
}
32
32
33
-
34
33
#[ cfg_attr( not( feature = "panic_immediate_abort" ) , inline( never) ) ]
35
34
#[ cfg_attr( feature = "panic_immediate_abort" , inline) ]
36
35
#[ cold]
37
36
#[ track_caller]
38
- #[ rustc_const_unstable( feature = "const_slice_index_impls " , issue = "none" ) ]
37
+ #[ rustc_const_unstable( feature = "const_slice_index " , issue = "none" ) ]
39
38
const fn slice_start_index_len_fail ( index : usize , len : usize ) -> ! {
40
39
// SAFETY: we are just panicking here
41
40
unsafe {
42
- const_eval_select ( ( index, len) , slice_start_index_len_fail_ct, slice_start_index_len_fail_rt)
41
+ const_eval_select (
42
+ ( index, len) ,
43
+ slice_start_index_len_fail_ct,
44
+ slice_start_index_len_fail_rt,
45
+ )
43
46
}
44
47
}
45
48
@@ -56,7 +59,7 @@ const fn slice_start_index_len_fail_ct(_: usize, _: usize) -> ! {
56
59
#[ cfg_attr( feature = "panic_immediate_abort" , inline) ]
57
60
#[ cold]
58
61
#[ track_caller]
59
- #[ rustc_const_unstable( feature = "const_slice_index_impls " , issue = "none" ) ]
62
+ #[ rustc_const_unstable( feature = "const_slice_index " , issue = "none" ) ]
60
63
const fn slice_end_index_len_fail ( index : usize , len : usize ) -> ! {
61
64
// SAFETY: we are just panicking here
62
65
unsafe {
@@ -77,7 +80,7 @@ const fn slice_end_index_len_fail_ct(_: usize, _: usize) -> ! {
77
80
#[ cfg_attr( feature = "panic_immediate_abort" , inline) ]
78
81
#[ cold]
79
82
#[ track_caller]
80
- #[ rustc_const_unstable( feature = "const_slice_index_impls " , issue = "none" ) ]
83
+ #[ rustc_const_unstable( feature = "const_slice_index " , issue = "none" ) ]
81
84
const fn slice_index_order_fail ( index : usize , end : usize ) -> ! {
82
85
// SAFETY: we are just panicking here
83
86
unsafe { const_eval_select ( ( index, end) , slice_index_order_fail_ct, slice_index_order_fail_rt) }
@@ -194,7 +197,7 @@ pub unsafe trait SliceIndex<T: ?Sized>: private_slice_index::Sealed {
194
197
}
195
198
196
199
#[ stable( feature = "slice_get_slice_impls" , since = "1.15.0" ) ]
197
- #[ rustc_const_unstable( feature = "const_slice_index_impls " , issue = "none" ) ]
200
+ #[ rustc_const_unstable( feature = "const_slice_index " , issue = "none" ) ]
198
201
unsafe impl < T > const SliceIndex < [ T ] > for usize {
199
202
type Output = T ;
200
203
@@ -239,7 +242,7 @@ unsafe impl<T> const SliceIndex<[T]> for usize {
239
242
}
240
243
241
244
#[ stable( feature = "slice_get_slice_impls" , since = "1.15.0" ) ]
242
- #[ rustc_const_unstable( feature = "const_slice_index_impls " , issue = "none" ) ]
245
+ #[ rustc_const_unstable( feature = "const_slice_index " , issue = "none" ) ]
243
246
unsafe impl < T > const SliceIndex < [ T ] > for ops:: Range < usize > {
244
247
type Output = [ T ] ;
245
248
@@ -304,7 +307,7 @@ unsafe impl<T> const SliceIndex<[T]> for ops::Range<usize> {
304
307
}
305
308
306
309
#[ stable( feature = "slice_get_slice_impls" , since = "1.15.0" ) ]
307
- #[ rustc_const_unstable( feature = "const_slice_index_impls " , issue = "none" ) ]
310
+ #[ rustc_const_unstable( feature = "const_slice_index " , issue = "none" ) ]
308
311
unsafe impl < T > const SliceIndex < [ T ] > for ops:: RangeTo < usize > {
309
312
type Output = [ T ] ;
310
313
@@ -342,7 +345,7 @@ unsafe impl<T> const SliceIndex<[T]> for ops::RangeTo<usize> {
342
345
}
343
346
344
347
#[ stable( feature = "slice_get_slice_impls" , since = "1.15.0" ) ]
345
- #[ rustc_const_unstable( feature = "const_slice_index_impls " , issue = "none" ) ]
348
+ #[ rustc_const_unstable( feature = "const_slice_index " , issue = "none" ) ]
346
349
unsafe impl < T > const SliceIndex < [ T ] > for ops:: RangeFrom < usize > {
347
350
type Output = [ T ] ;
348
351
@@ -388,7 +391,7 @@ unsafe impl<T> const SliceIndex<[T]> for ops::RangeFrom<usize> {
388
391
}
389
392
390
393
#[ stable( feature = "slice_get_slice_impls" , since = "1.15.0" ) ]
391
- #[ rustc_const_unstable( feature = "const_slice_index_impls " , issue = "none" ) ]
394
+ #[ rustc_const_unstable( feature = "const_slice_index " , issue = "none" ) ]
392
395
unsafe impl < T > const SliceIndex < [ T ] > for ops:: RangeFull {
393
396
type Output = [ T ] ;
394
397
@@ -424,7 +427,7 @@ unsafe impl<T> const SliceIndex<[T]> for ops::RangeFull {
424
427
}
425
428
426
429
#[ stable( feature = "inclusive_range" , since = "1.26.0" ) ]
427
- #[ rustc_const_unstable( feature = "const_slice_index_impls " , issue = "none" ) ]
430
+ #[ rustc_const_unstable( feature = "const_slice_index " , issue = "none" ) ]
428
431
unsafe impl < T > const SliceIndex < [ T ] > for ops:: RangeInclusive < usize > {
429
432
type Output = [ T ] ;
430
433
@@ -468,7 +471,7 @@ unsafe impl<T> const SliceIndex<[T]> for ops::RangeInclusive<usize> {
468
471
}
469
472
470
473
#[ stable( feature = "inclusive_range" , since = "1.26.0" ) ]
471
- #[ rustc_const_unstable( feature = "const_slice_index_impls " , issue = "none" ) ]
474
+ #[ rustc_const_unstable( feature = "const_slice_index " , issue = "none" ) ]
472
475
unsafe impl < T > const SliceIndex < [ T ] > for ops:: RangeToInclusive < usize > {
473
476
type Output = [ T ] ;
474
477
0 commit comments