Skip to content

Commit

Permalink
Mark '<[T; N]>::as_mut_slice' as 'const';
Browse files Browse the repository at this point in the history
  • Loading branch information
bjoernager committed Nov 22, 2024
1 parent 3c558bf commit b4a5067
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/src/array/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,8 @@ impl<T, const N: usize> [T; N] {
/// Returns a mutable slice containing the entire array. Equivalent to
/// `&mut s[..]`.
#[stable(feature = "array_as_slice", since = "1.57.0")]
pub fn as_mut_slice(&mut self) -> &mut [T] {
#[rustc_const_unstable(feature = "const_array_as_mut_slice", issue = "133333")]
pub const fn as_mut_slice(&mut self) -> &mut [T] {
self
}

Expand Down

0 comments on commit b4a5067

Please sign in to comment.