about summary refs log tree commit diff
path: root/library/core/src/array
diff options
context:
space:
mode:
authorultrabear <bearodark@gmail.com>2024-09-18 19:16:28 -0700
committerultrabear <bearodark@gmail.com>2024-10-09 00:38:01 -0700
commit461b49d96dd012dd13e172a166b7dad9ed7543d9 (patch)
treecc96180ecd5d0e9d189abee2d102a66cd948fe8b /library/core/src/array
parent883f9a2c8f8923eafafbeba8b18361424b148f05 (diff)
downloadrust-461b49d96dd012dd13e172a166b7dad9ed7543d9.tar.gz
rust-461b49d96dd012dd13e172a166b7dad9ed7543d9.zip
stabilize `{slice,array}::from_mut`
Diffstat (limited to 'library/core/src/array')
-rw-r--r--library/core/src/array/mod.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/library/core/src/array/mod.rs b/library/core/src/array/mod.rs
index 24c42bc85dd..a95046162d2 100644
--- a/library/core/src/array/mod.rs
+++ b/library/core/src/array/mod.rs
@@ -146,7 +146,8 @@ pub const fn from_ref<T>(s: &T) -> &[T; 1] {
 
 /// Converts a mutable reference to `T` into a mutable reference to an array of length 1 (without copying).
 #[stable(feature = "array_from_ref", since = "1.53.0")]
-#[rustc_const_unstable(feature = "const_array_from_ref", issue = "90206")]
+#[rustc_const_stable(feature = "const_array_from_ref", since = "CURRENT_RUSTC_VERSION")]
+#[cfg_attr(bootstrap, rustc_allow_const_fn_unstable(const_mut_refs))]
 pub const fn from_mut<T>(s: &mut T) -> &mut [T; 1] {
     // SAFETY: Converting `&mut T` to `&mut [T; 1]` is sound.
     unsafe { &mut *(s as *mut T).cast::<[T; 1]>() }