rust/library/core
bors 9e3e517446 Auto merge of #130829 - Urgau:option_array_transpose, r=ibraheemdev
Add `[Option<T>; N]::transpose`

This PR as a new unstable libs API, `[Option<T>; N]::transpose`, which permits going from `[Option<T>; N]` to `Option<[T; N]>`.

This new API doesn't have an ACP as it was directly asked by T-libs-api in https://github.com/rust-lang/rust/issues/97601#issuecomment-2372109119:

> [..] but it'd be trivial to provide a helper method `.transpose()` that turns array-of-Option into Option-of-array (**and we think that method should exist**; it already does for array-of-MaybeUninit).

r? libs
2024-10-02 04:31:15 +00:00
..
benches Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
src Auto merge of #130829 - Urgau:option_array_transpose, r=ibraheemdev 2024-10-02 04:31:15 +00:00
tests stabilize const_cell_into_inner 2024-09-28 11:29:02 +02:00
Cargo.toml Port std library to RTEMS 2024-09-03 09:19:29 +02:00