Rollup merge of #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.
This commit is contained in:
@@ -956,7 +956,6 @@ impl<T> [T] {
|
||||
/// [`swap`]: slice::swap
|
||||
/// [undefined behavior]: https://doc.rust-lang.org/reference/behavior-considered-undefined.html
|
||||
#[unstable(feature = "slice_swap_unchecked", issue = "88539")]
|
||||
#[rustc_const_unstable(feature = "slice_swap_unchecked", issue = "88539")]
|
||||
pub const unsafe fn swap_unchecked(&mut self, a: usize, b: usize) {
|
||||
assert_unsafe_precondition!(
|
||||
check_library_ub,
|
||||
@@ -3734,6 +3733,7 @@ impl<T> [T] {
|
||||
#[inline]
|
||||
#[stable(feature = "copy_from_slice", since = "1.9.0")]
|
||||
#[rustc_const_unstable(feature = "const_copy_from_slice", issue = "131415")]
|
||||
#[rustc_const_stable_indirect]
|
||||
#[track_caller]
|
||||
pub const fn copy_from_slice(&mut self, src: &[T])
|
||||
where
|
||||
|
||||
Reference in New Issue
Block a user