diff options
| author | Ralf Jung <post@ralfj.de> | 2024-09-08 08:54:01 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2024-09-08 23:08:43 +0200 |
| commit | 7a3a317618885a8949c8b95c9a38f3f9729b1f3c (patch) | |
| tree | 81b09cc0a118f7d65bdabca82ca3bbbb47dbb9a8 /library/core/src/slice | |
| parent | 332fa6aa6ed70e285c155d112a30027947cad12b (diff) | |
| download | rust-7a3a317618885a8949c8b95c9a38f3f9729b1f3c.tar.gz rust-7a3a317618885a8949c8b95c9a38f3f9729b1f3c.zip | |
remove const_slice_index annotations, it never had a feature gate anyway
Diffstat (limited to 'library/core/src/slice')
| -rw-r--r-- | library/core/src/slice/index.rs | 10 | ||||
| -rw-r--r-- | library/core/src/slice/memchr.rs | 1 |
2 files changed, 0 insertions, 11 deletions
diff --git a/library/core/src/slice/index.rs b/library/core/src/slice/index.rs index 7adcee1ed6b..bc8571c8503 100644 --- a/library/core/src/slice/index.rs +++ b/library/core/src/slice/index.rs @@ -31,7 +31,6 @@ where #[cfg_attr(not(feature = "panic_immediate_abort"), inline(never), cold)] #[cfg_attr(feature = "panic_immediate_abort", inline)] #[track_caller] -#[rustc_const_unstable(feature = "const_slice_index", issue = "none")] const fn slice_start_index_len_fail(index: usize, len: usize) -> ! { // FIXME(const-hack): once integer formatting in panics is possible, we // should use the same implementation at compiletime and runtime. @@ -53,7 +52,6 @@ const fn slice_start_index_len_fail_ct(_: usize, _: usize) -> ! { #[cfg_attr(not(feature = "panic_immediate_abort"), inline(never), cold)] #[cfg_attr(feature = "panic_immediate_abort", inline)] #[track_caller] -#[rustc_const_unstable(feature = "const_slice_index", issue = "none")] const fn slice_end_index_len_fail(index: usize, len: usize) -> ! { // FIXME(const-hack): once integer formatting in panics is possible, we // should use the same implementation at compiletime and runtime. @@ -75,7 +73,6 @@ const fn slice_end_index_len_fail_ct(_: usize, _: usize) -> ! { #[cfg_attr(not(feature = "panic_immediate_abort"), inline(never), cold)] #[cfg_attr(feature = "panic_immediate_abort", inline)] #[track_caller] -#[rustc_const_unstable(feature = "const_slice_index", issue = "none")] const fn slice_index_order_fail(index: usize, end: usize) -> ! { // FIXME(const-hack): once integer formatting in panics is possible, we // should use the same implementation at compiletime and runtime. @@ -249,7 +246,6 @@ pub unsafe trait SliceIndex<T: ?Sized>: private_slice_index::Sealed { /// The methods `index` and `index_mut` panic if the index is out of bounds. #[stable(feature = "slice_get_slice_impls", since = "1.15.0")] -#[rustc_const_unstable(feature = "const_slice_index", issue = "none")] unsafe impl<T> SliceIndex<[T]> for usize { type Output = T; @@ -389,7 +385,6 @@ unsafe impl<T> SliceIndex<[T]> for ops::IndexRange { /// - the start of the range is greater than the end of the range or /// - the end of the range is out of bounds. #[stable(feature = "slice_get_slice_impls", since = "1.15.0")] -#[rustc_const_unstable(feature = "const_slice_index", issue = "none")] unsafe impl<T> SliceIndex<[T]> for ops::Range<usize> { type Output = [T]; @@ -525,7 +520,6 @@ unsafe impl<T> SliceIndex<[T]> for range::Range<usize> { /// The methods `index` and `index_mut` panic if the end of the range is out of bounds. #[stable(feature = "slice_get_slice_impls", since = "1.15.0")] -#[rustc_const_unstable(feature = "const_slice_index", issue = "none")] unsafe impl<T> SliceIndex<[T]> for ops::RangeTo<usize> { type Output = [T]; @@ -564,7 +558,6 @@ unsafe impl<T> SliceIndex<[T]> for ops::RangeTo<usize> { /// The methods `index` and `index_mut` panic if the start of the range is out of bounds. #[stable(feature = "slice_get_slice_impls", since = "1.15.0")] -#[rustc_const_unstable(feature = "const_slice_index", issue = "none")] unsafe impl<T> SliceIndex<[T]> for ops::RangeFrom<usize> { type Output = [T]; @@ -647,7 +640,6 @@ unsafe impl<T> SliceIndex<[T]> for range::RangeFrom<usize> { } #[stable(feature = "slice_get_slice_impls", since = "1.15.0")] -#[rustc_const_unstable(feature = "const_slice_index", issue = "none")] unsafe impl<T> SliceIndex<[T]> for ops::RangeFull { type Output = [T]; @@ -687,7 +679,6 @@ unsafe impl<T> SliceIndex<[T]> for ops::RangeFull { /// - the start of the range is greater than the end of the range or /// - the end of the range is out of bounds. #[stable(feature = "inclusive_range", since = "1.26.0")] -#[rustc_const_unstable(feature = "const_slice_index", issue = "none")] unsafe impl<T> SliceIndex<[T]> for ops::RangeInclusive<usize> { type Output = [T]; @@ -769,7 +760,6 @@ unsafe impl<T> SliceIndex<[T]> for range::RangeInclusive<usize> { /// The methods `index` and `index_mut` panic if the end of the range is out of bounds. #[stable(feature = "inclusive_range", since = "1.26.0")] -#[rustc_const_unstable(feature = "const_slice_index", issue = "none")] unsafe impl<T> SliceIndex<[T]> for ops::RangeToInclusive<usize> { type Output = [T]; diff --git a/library/core/src/slice/memchr.rs b/library/core/src/slice/memchr.rs index da7ceb2dd0a..be19c3d3bc1 100644 --- a/library/core/src/slice/memchr.rs +++ b/library/core/src/slice/memchr.rs @@ -51,7 +51,6 @@ const fn memchr_naive(x: u8, text: &[u8]) -> Option<usize> { } #[rustc_allow_const_fn_unstable(const_cmp)] -#[rustc_allow_const_fn_unstable(const_slice_index)] #[rustc_allow_const_fn_unstable(const_align_offset)] #[rustc_const_stable(feature = "const_memchr", since = "1.65.0")] const fn memchr_aligned(x: u8, text: &[u8]) -> Option<usize> { |
