Skip to content

Commit 1b763fc

Browse files
committed
remove const_slice_index annotations, it never had a feature gate anyway
1 parent 9849587 commit 1b763fc

File tree

4 files changed

+0
-18
lines changed

4 files changed

+0
-18
lines changed

core/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@
149149
#![feature(const_size_of_val_raw)]
150150
#![feature(const_slice_from_raw_parts_mut)]
151151
#![feature(const_slice_from_ref)]
152-
#![feature(const_slice_index)]
153152
#![feature(const_slice_split_at_mut)]
154153
#![feature(const_str_from_utf8_unchecked_mut)]
155154
#![feature(const_strict_overflow_ops)]

core/src/slice/index.rs

-10
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ where
3131
#[cfg_attr(not(feature = "panic_immediate_abort"), inline(never), cold)]
3232
#[cfg_attr(feature = "panic_immediate_abort", inline)]
3333
#[track_caller]
34-
#[rustc_const_unstable(feature = "const_slice_index", issue = "none")]
3534
const fn slice_start_index_len_fail(index: usize, len: usize) -> ! {
3635
// FIXME(const-hack): once integer formatting in panics is possible, we
3736
// should use the same implementation at compiletime and runtime.
@@ -53,7 +52,6 @@ const fn slice_start_index_len_fail_ct(_: usize, _: usize) -> ! {
5352
#[cfg_attr(not(feature = "panic_immediate_abort"), inline(never), cold)]
5453
#[cfg_attr(feature = "panic_immediate_abort", inline)]
5554
#[track_caller]
56-
#[rustc_const_unstable(feature = "const_slice_index", issue = "none")]
5755
const fn slice_end_index_len_fail(index: usize, len: usize) -> ! {
5856
// FIXME(const-hack): once integer formatting in panics is possible, we
5957
// should use the same implementation at compiletime and runtime.
@@ -75,7 +73,6 @@ const fn slice_end_index_len_fail_ct(_: usize, _: usize) -> ! {
7573
#[cfg_attr(not(feature = "panic_immediate_abort"), inline(never), cold)]
7674
#[cfg_attr(feature = "panic_immediate_abort", inline)]
7775
#[track_caller]
78-
#[rustc_const_unstable(feature = "const_slice_index", issue = "none")]
7976
const fn slice_index_order_fail(index: usize, end: usize) -> ! {
8077
// FIXME(const-hack): once integer formatting in panics is possible, we
8178
// should use the same implementation at compiletime and runtime.
@@ -249,7 +246,6 @@ pub unsafe trait SliceIndex<T: ?Sized>: private_slice_index::Sealed {
249246

250247
/// The methods `index` and `index_mut` panic if the index is out of bounds.
251248
#[stable(feature = "slice_get_slice_impls", since = "1.15.0")]
252-
#[rustc_const_unstable(feature = "const_slice_index", issue = "none")]
253249
unsafe impl<T> SliceIndex<[T]> for usize {
254250
type Output = T;
255251

@@ -389,7 +385,6 @@ unsafe impl<T> SliceIndex<[T]> for ops::IndexRange {
389385
/// - the start of the range is greater than the end of the range or
390386
/// - the end of the range is out of bounds.
391387
#[stable(feature = "slice_get_slice_impls", since = "1.15.0")]
392-
#[rustc_const_unstable(feature = "const_slice_index", issue = "none")]
393388
unsafe impl<T> SliceIndex<[T]> for ops::Range<usize> {
394389
type Output = [T];
395390

@@ -525,7 +520,6 @@ unsafe impl<T> SliceIndex<[T]> for range::Range<usize> {
525520

526521
/// The methods `index` and `index_mut` panic if the end of the range is out of bounds.
527522
#[stable(feature = "slice_get_slice_impls", since = "1.15.0")]
528-
#[rustc_const_unstable(feature = "const_slice_index", issue = "none")]
529523
unsafe impl<T> SliceIndex<[T]> for ops::RangeTo<usize> {
530524
type Output = [T];
531525

@@ -564,7 +558,6 @@ unsafe impl<T> SliceIndex<[T]> for ops::RangeTo<usize> {
564558

565559
/// The methods `index` and `index_mut` panic if the start of the range is out of bounds.
566560
#[stable(feature = "slice_get_slice_impls", since = "1.15.0")]
567-
#[rustc_const_unstable(feature = "const_slice_index", issue = "none")]
568561
unsafe impl<T> SliceIndex<[T]> for ops::RangeFrom<usize> {
569562
type Output = [T];
570563

@@ -647,7 +640,6 @@ unsafe impl<T> SliceIndex<[T]> for range::RangeFrom<usize> {
647640
}
648641

649642
#[stable(feature = "slice_get_slice_impls", since = "1.15.0")]
650-
#[rustc_const_unstable(feature = "const_slice_index", issue = "none")]
651643
unsafe impl<T> SliceIndex<[T]> for ops::RangeFull {
652644
type Output = [T];
653645

@@ -687,7 +679,6 @@ unsafe impl<T> SliceIndex<[T]> for ops::RangeFull {
687679
/// - the start of the range is greater than the end of the range or
688680
/// - the end of the range is out of bounds.
689681
#[stable(feature = "inclusive_range", since = "1.26.0")]
690-
#[rustc_const_unstable(feature = "const_slice_index", issue = "none")]
691682
unsafe impl<T> SliceIndex<[T]> for ops::RangeInclusive<usize> {
692683
type Output = [T];
693684

@@ -769,7 +760,6 @@ unsafe impl<T> SliceIndex<[T]> for range::RangeInclusive<usize> {
769760

770761
/// The methods `index` and `index_mut` panic if the end of the range is out of bounds.
771762
#[stable(feature = "inclusive_range", since = "1.26.0")]
772-
#[rustc_const_unstable(feature = "const_slice_index", issue = "none")]
773763
unsafe impl<T> SliceIndex<[T]> for ops::RangeToInclusive<usize> {
774764
type Output = [T];
775765

core/src/slice/memchr.rs

-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ const fn memchr_naive(x: u8, text: &[u8]) -> Option<usize> {
5151
}
5252

5353
#[rustc_allow_const_fn_unstable(const_cmp)]
54-
#[rustc_allow_const_fn_unstable(const_slice_index)]
5554
#[rustc_allow_const_fn_unstable(const_align_offset)]
5655
#[rustc_const_stable(feature = "const_memchr", since = "1.65.0")]
5756
const fn memchr_aligned(x: u8, text: &[u8]) -> Option<usize> {

core/src/str/traits.rs

-6
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ const fn str_index_overflow_fail() -> ! {
9292
///
9393
/// Equivalent to `&self[0 .. len]` or `&mut self[0 .. len]`.
9494
#[stable(feature = "str_checked_slicing", since = "1.20.0")]
95-
#[rustc_const_unstable(feature = "const_slice_index", issue = "none")]
9695
unsafe impl SliceIndex<str> for ops::RangeFull {
9796
type Output = str;
9897
#[inline]
@@ -157,7 +156,6 @@ unsafe impl SliceIndex<str> for ops::RangeFull {
157156
/// // &s[3 .. 100];
158157
/// ```
159158
#[stable(feature = "str_checked_slicing", since = "1.20.0")]
160-
#[rustc_const_unstable(feature = "const_slice_index", issue = "none")]
161159
unsafe impl SliceIndex<str> for ops::Range<usize> {
162160
type Output = str;
163161
#[inline]
@@ -429,7 +427,6 @@ unsafe impl SliceIndex<str> for (ops::Bound<usize>, ops::Bound<usize>) {
429427
/// Panics if `end` does not point to the starting byte offset of a
430428
/// character (as defined by `is_char_boundary`), or if `end > len`.
431429
#[stable(feature = "str_checked_slicing", since = "1.20.0")]
432-
#[rustc_const_unstable(feature = "const_slice_index", issue = "none")]
433430
unsafe impl SliceIndex<str> for ops::RangeTo<usize> {
434431
type Output = str;
435432
#[inline]
@@ -498,7 +495,6 @@ unsafe impl SliceIndex<str> for ops::RangeTo<usize> {
498495
/// Panics if `begin` does not point to the starting byte offset of
499496
/// a character (as defined by `is_char_boundary`), or if `begin > len`.
500497
#[stable(feature = "str_checked_slicing", since = "1.20.0")]
501-
#[rustc_const_unstable(feature = "const_slice_index", issue = "none")]
502498
unsafe impl SliceIndex<str> for ops::RangeFrom<usize> {
503499
type Output = str;
504500
#[inline]
@@ -625,7 +621,6 @@ unsafe impl SliceIndex<str> for range::RangeFrom<usize> {
625621
/// to the ending byte offset of a character (`end + 1` is either a starting
626622
/// byte offset or equal to `len`), if `begin > end`, or if `end >= len`.
627623
#[stable(feature = "inclusive_range", since = "1.26.0")]
628-
#[rustc_const_unstable(feature = "const_slice_index", issue = "none")]
629624
unsafe impl SliceIndex<str> for ops::RangeInclusive<usize> {
630625
type Output = str;
631626
#[inline]
@@ -714,7 +709,6 @@ unsafe impl SliceIndex<str> for range::RangeInclusive<usize> {
714709
/// (`end + 1` is either a starting byte offset as defined by
715710
/// `is_char_boundary`, or equal to `len`), or if `end >= len`.
716711
#[stable(feature = "inclusive_range", since = "1.26.0")]
717-
#[rustc_const_unstable(feature = "const_slice_index", issue = "none")]
718712
unsafe impl SliceIndex<str> for ops::RangeToInclusive<usize> {
719713
type Output = str;
720714
#[inline]

0 commit comments

Comments
 (0)