Matthias Krüger
da2e3aabca
Rollup merge of #147540 - bjoernager:slice-as-array, r=Amanieu
Stabilise `as_array` in `[_]` and `*const [_]`; stabilise `as_mut_array` in `[_]` and `*mut [_]`.
Tracking issue: rust-lang/rust#133508
Closes: rust-lang/rust#133508
This PR stabilises the `as_array` and `as_mut_array` associated functions from the `core_slice_as_array` feature gate:
```rust
// core::slice
impl<T> [T] {
pub const fn as_array<const N: usize>(&self) -> Option<&[T; N]>;
pub const fn as_mut_array<const N: usize>(&mut self) -> Option<&mut [T; N]>;
}
// core::ptr
impl<T> *const [T] {
pub const fn as_array<const N: usize>(self) -> Option<*const [T; N]>;
}
impl<T> *mut [T] {
pub const fn as_mut_array<const N: usize>(self) -> Option<*mut [T; N]>;
}
```
It also updates the feature gates and tracking issues for all items associated with the previous `slice_as_array` tracking issue (including these four that are being stabilised).
~~FCP missing.~~
2025-11-08 15:42:22 +01:00
..
2025-11-05 21:28:29 +01:00
2025-11-05 11:25:29 +00:00
2025-11-07 21:58:38 +00:00
2025-10-30 07:56:16 +08:00
2025-11-05 11:25:27 +00:00
2025-11-05 11:25:27 +00:00
2025-11-05 11:25:27 +00:00
2025-11-05 11:25:27 +00:00
2025-11-05 11:25:27 +00:00
2025-11-05 11:25:27 +00:00
2025-11-06 23:10:39 +08:00
2025-11-05 11:25:27 +00:00
2025-11-06 15:39:45 -08:00
2025-11-08 15:42:22 +01:00
2025-11-08 07:57:14 +00:00
2025-11-08 15:42:21 +01:00
2025-11-05 11:25:27 +00:00
2025-11-05 11:25:27 +00:00
2025-11-05 11:25:27 +00:00
2025-11-05 11:25:27 +00:00
2025-11-05 11:25:27 +00:00
2025-11-06 11:45:06 +00:00
2025-11-05 11:25:27 +00:00
2025-11-06 12:49:48 +01:00
2025-11-05 11:25:27 +00:00
2025-11-05 11:25:29 +00:00
2025-10-12 08:08:30 +00:00
2025-11-06 15:39:45 -08:00
2025-11-05 11:25:27 +00:00
2025-11-01 08:25:44 +01:00
2025-11-06 17:34:48 +08:00
2025-11-05 11:25:27 +00:00
2025-11-05 11:25:27 +00:00
2025-11-05 11:25:27 +00:00
2025-11-06 15:39:45 -08:00
2025-11-06 14:07:15 +11:00
2025-11-04 11:44:55 +01:00
2025-11-06 03:34:38 -05:00
2025-10-15 13:17:25 +01:00
2025-11-06 14:07:16 +11:00
2025-11-06 11:18:38 +08:00
2025-11-02 15:56:48 +01:00
2025-10-28 10:26:50 +11:00
2025-11-07 09:50:49 +00:00
2025-11-05 12:12:10 +01:00
2025-11-06 12:29:58 +01:00
2025-11-05 09:01:07 -07:00
2025-11-05 11:25:29 +00:00
2025-11-05 21:28:29 +01:00
2025-10-31 14:48:43 +01:00
2025-11-05 11:25:27 +00:00
2025-11-05 11:25:29 +00:00
2025-11-05 11:25:29 +00:00
2025-11-05 11:25:27 +00:00
2025-11-06 17:17:03 +05:00
2025-11-05 11:25:27 +00:00
2025-10-28 20:39:32 +11:00
2025-11-05 11:25:29 +00:00
2025-11-06 15:39:45 -08:00
2025-11-08 15:42:19 +01:00
2025-11-05 11:25:27 +00:00
2025-11-08 15:42:19 +01:00
2025-10-12 08:08:30 +00:00
2025-11-07 00:21:18 -05:00
2025-10-13 00:20:10 +00:00
2025-10-09 01:24:55 +08:00
2025-11-05 11:25:27 +00:00
2025-10-27 22:13:23 +11:00
2025-10-31 14:14:05 -04:00