Skip to content

Commit b4a5067

Browse files
committed
Mark '<[T; N]>::as_mut_slice' as 'const';
1 parent 3c558bf commit b4a5067

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/src/array/mod.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,8 @@ impl<T, const N: usize> [T; N] {
577577
/// Returns a mutable slice containing the entire array. Equivalent to
578578
/// `&mut s[..]`.
579579
#[stable(feature = "array_as_slice", since = "1.57.0")]
580-
pub fn as_mut_slice(&mut self) -> &mut [T] {
580+
#[rustc_const_unstable(feature = "const_array_as_mut_slice", issue = "133333")]
581+
pub const fn as_mut_slice(&mut self) -> &mut [T] {
581582
self
582583
}
583584

0 commit comments

Comments
 (0)