Skip to content

Commit f479cf0

Browse files
tgross35gitbot
authored and
gitbot
committed
Rollup merge of rust-lang#137516 - RalfJung:rustc_const_unstable-cleanup, r=Amanieu
remove some unnecessary rustc_const_unstable If the function is anyway unstable, it doesn't need to be `rustc_const_unstable`. `copy_from_slice` turns out to not do anything const-unstable itself, we just haven't stably committed to it being available in const yet. See [here](https://rustc-dev-guide.rust-lang.org/stability.html?highlight=rustc_const_stable_indirect) for more details on the `rustc_const_stable_indirect` attribute.
2 parents 5cce5b7 + 0741a54 commit f479cf0

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

core/src/mem/maybe_uninit.rs

-3
Original file line numberDiff line numberDiff line change
@@ -1041,7 +1041,6 @@ impl<T> MaybeUninit<T> {
10411041

10421042
/// Deprecated version of [`slice::assume_init_ref`].
10431043
#[unstable(feature = "maybe_uninit_slice", issue = "63569")]
1044-
#[rustc_const_unstable(feature = "maybe_uninit_slice", issue = "63569")]
10451044
#[deprecated(
10461045
note = "replaced by inherent assume_init_ref method; will eventually be removed",
10471046
since = "1.83.0"
@@ -1053,7 +1052,6 @@ impl<T> MaybeUninit<T> {
10531052

10541053
/// Deprecated version of [`slice::assume_init_mut`].
10551054
#[unstable(feature = "maybe_uninit_slice", issue = "63569")]
1056-
#[rustc_const_unstable(feature = "maybe_uninit_slice", issue = "63569")]
10571055
#[deprecated(
10581056
note = "replaced by inherent assume_init_mut method; will eventually be removed",
10591057
since = "1.83.0"
@@ -1326,7 +1324,6 @@ impl<T> [MaybeUninit<T>] {
13261324
///
13271325
/// [`write_clone_of_slice`]: slice::write_clone_of_slice
13281326
#[unstable(feature = "maybe_uninit_write_slice", issue = "79995")]
1329-
#[rustc_const_unstable(feature = "maybe_uninit_write_slice", issue = "79995")]
13301327
pub const fn write_copy_of_slice(&mut self, src: &[T]) -> &mut [T]
13311328
where
13321329
T: Copy,

core/src/slice/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -956,7 +956,6 @@ impl<T> [T] {
956956
/// [`swap`]: slice::swap
957957
/// [undefined behavior]: https://doc.rust-lang.org/reference/behavior-considered-undefined.html
958958
#[unstable(feature = "slice_swap_unchecked", issue = "88539")]
959-
#[rustc_const_unstable(feature = "slice_swap_unchecked", issue = "88539")]
960959
pub const unsafe fn swap_unchecked(&mut self, a: usize, b: usize) {
961960
assert_unsafe_precondition!(
962961
check_library_ub,
@@ -3734,6 +3733,7 @@ impl<T> [T] {
37343733
#[inline]
37353734
#[stable(feature = "copy_from_slice", since = "1.9.0")]
37363735
#[rustc_const_unstable(feature = "const_copy_from_slice", issue = "131415")]
3736+
#[rustc_const_stable_indirect]
37373737
#[track_caller]
37383738
pub const fn copy_from_slice(&mut self, src: &[T])
37393739
where

0 commit comments

Comments
 (0)