about summary refs log tree commit diff
path: root/compiler/rustc_builtin_macros/src/errors.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-10-02 04:31:15 +0000
committerbors <bors@rust-lang.org>2024-10-02 04:31:15 +0000
commit9e3e5174462afaf6c3b9db9b35c6d1934521848a (patch)
tree5b962d57a34fee69d453d2815d7438b22e02379d /compiler/rustc_builtin_macros/src/errors.rs
parent1d71891c6b6dc0f8c27493e6e6026b6ba44664e0 (diff)
parent1e241045873cf4aebb5f6fd7ef3a91f32196dbf1 (diff)
downloadrust-9e3e5174462afaf6c3b9db9b35c6d1934521848a.tar.gz
rust-9e3e5174462afaf6c3b9db9b35c6d1934521848a.zip
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
Diffstat (limited to 'compiler/rustc_builtin_macros/src/errors.rs')
0 files changed, 0 insertions, 0 deletions