Skip to content

Commit 27d6961

Browse files
committed
Fill tracking issue for const_slice_from_ref and const_array_from_ref
1 parent a288bf6 commit 27d6961

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

library/core/src/array/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,15 @@ where
8585

8686
/// Converts a reference to `T` into a reference to an array of length 1 (without copying).
8787
#[stable(feature = "array_from_ref", since = "1.53.0")]
88-
#[rustc_const_unstable(feature = "const_array_from_ref", issue = "none")]
88+
#[rustc_const_unstable(feature = "const_array_from_ref", issue = "90206")]
8989
pub const fn from_ref<T>(s: &T) -> &[T; 1] {
9090
// SAFETY: Converting `&T` to `&[T; 1]` is sound.
9191
unsafe { &*(s as *const T).cast::<[T; 1]>() }
9292
}
9393

9494
/// Converts a mutable reference to `T` into a mutable reference to an array of length 1 (without copying).
9595
#[stable(feature = "array_from_ref", since = "1.53.0")]
96-
#[rustc_const_unstable(feature = "const_array_from_ref", issue = "none")]
96+
#[rustc_const_unstable(feature = "const_array_from_ref", issue = "90206")]
9797
pub const fn from_mut<T>(s: &mut T) -> &mut [T; 1] {
9898
// SAFETY: Converting `&mut T` to `&mut [T; 1]` is sound.
9999
unsafe { &mut *(s as *mut T).cast::<[T; 1]>() }

library/core/src/slice/raw.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -138,14 +138,14 @@ pub unsafe fn from_raw_parts_mut<'a, T>(data: *mut T, len: usize) -> &'a mut [T]
138138

139139
/// Converts a reference to T into a slice of length 1 (without copying).
140140
#[stable(feature = "from_ref", since = "1.28.0")]
141-
#[rustc_const_unstable(feature = "const_slice_from_ref", issue = "none")]
141+
#[rustc_const_unstable(feature = "const_slice_from_ref", issue = "90206")]
142142
pub const fn from_ref<T>(s: &T) -> &[T] {
143143
array::from_ref(s)
144144
}
145145

146146
/// Converts a reference to T into a slice of length 1 (without copying).
147147
#[stable(feature = "from_ref", since = "1.28.0")]
148-
#[rustc_const_unstable(feature = "const_slice_from_ref", issue = "none")]
148+
#[rustc_const_unstable(feature = "const_slice_from_ref", issue = "90206")]
149149
pub const fn from_mut<T>(s: &mut T) -> &mut [T] {
150150
array::from_mut(s)
151151
}

0 commit comments

Comments
 (0)