diff options
| author | Maybe Waffle <waffle.lapkin@gmail.com> | 2022-05-24 22:33:31 +0400 |
|---|---|---|
| committer | Maybe Waffle <waffle.lapkin@gmail.com> | 2022-05-24 22:33:31 +0400 |
| commit | 7a09b8a7b52e5f9e9f7145657629bca9d89f16f0 (patch) | |
| tree | 5a4c6fb277a45623ea7b05e78da936334b092303 /library/core/src/array | |
| parent | b2eba058e6e1c698723e47074561a30b50b5fa7a (diff) | |
| download | rust-7a09b8a7b52e5f9e9f7145657629bca9d89f16f0.tar.gz rust-7a09b8a7b52e5f9e9f7145657629bca9d89f16f0.zip | |
Stabilize `{slice,array}::from_ref`
Diffstat (limited to 'library/core/src/array')
| -rw-r--r-- | library/core/src/array/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/core/src/array/mod.rs b/library/core/src/array/mod.rs index fba1a5a751c..2ea4458bf64 100644 --- a/library/core/src/array/mod.rs +++ b/library/core/src/array/mod.rs @@ -92,7 +92,7 @@ where /// Converts a reference to `T` into a 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_shared", since = "1.63.0")] pub const fn from_ref<T>(s: &T) -> &[T; 1] { // SAFETY: Converting `&T` to `&[T; 1]` is sound. unsafe { &*(s as *const T).cast::<[T; 1]>() } |
