diff options
| author | Gabriel Bjørnager Jensen <gabriel@achernar.io> | 2024-11-22 09:44:08 +0100 |
|---|---|---|
| committer | Gabriel Bjørnager Jensen <gabriel@achernar.io> | 2024-11-22 09:49:30 +0100 |
| commit | c85a742cb12491b1f138c5d208f9c0cc5434dd77 (patch) | |
| tree | ec4b10bc0178807a101fe28f0aae12fc10e7f6b1 /library/core/src/array | |
| parent | 5d3c6ee9b34989595d2a72b79e61ca37e949d757 (diff) | |
| download | rust-c85a742cb12491b1f138c5d208f9c0cc5434dd77.tar.gz rust-c85a742cb12491b1f138c5d208f9c0cc5434dd77.zip | |
Mark '<[T; N]>::as_mut_slice' as 'const';
Diffstat (limited to 'library/core/src/array')
| -rw-r--r-- | library/core/src/array/mod.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/library/core/src/array/mod.rs b/library/core/src/array/mod.rs index 4764d7f0b0f..a9d6a1d6a5d 100644 --- a/library/core/src/array/mod.rs +++ b/library/core/src/array/mod.rs @@ -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 } |
