Skip to content

Commit f8f5560

Browse files
authored
Unrolled build for rust-lang#133332
Rollup merge of rust-lang#133332 - bjoernager:const-array-as-mut-slice, r=jhpratt Mark `<[T; N]>::as_mut_slice` with the `const` specifier. Tracking issue: rust-lang#133333 `<[T; N]>::as_mut_slice` can have the `const` specifier without any changes to the function body.
2 parents ff1737b + c85a742 commit f8f5560

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

library/core/src/array/mod.rs

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

0 commit comments

Comments
 (0)