Uh oh!
There was an error while loading. Please reload this page.
Implement tuple<->array convertions via From - #97594
Conversation
rust-highfive
commented
May 31, 2022
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
rust-highfive
commented
May 31, 2022
(rust-highfive has picked a reviewer for you, use r? to override) |
WaffleLapkin
commented
May 31, 2022
r? rust-lang/libs-api @rustbot label +T-libs-api -T-libs |
WaffleLapkin
commented
May 31, 2022
@rustbot label -S-waiting-on-review +S-waiting-on-author |
Uh oh!
There was an error while loading. Please reload this page.
This comment has been minimized.
This comment has been minimized.
WaffleLapkin
commented
Jun 2, 2022
I've removed
They all basically do the following: fnf() -> Result<(),()>{Ok(())?;// <--Ok(())}For this to work you need to infer IIRC this is not considered a breaking change per rust rules, because it can be fixed by adding types: fnf() -> Result<(),()>{Ok::<_,()>(())?;//^^^^^^^^^Ok(())}However I'm not sure how widespread this pattern is and if this is worth the potential breakage. |
WaffleLapkin
commented
Jun 2, 2022
@rustbot ready |
bors
commented
Aug 19, 2022
☔ The latest upstream changes (presumably #98807) made this pull request unmergeable. Please resolve the merge conflicts. |
46a44a8 to
156c906Comparerustbot
commented
Aug 19, 2022
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
camelid
commented
Feb 11, 2023
ping from triage: What's the status of this PR? |
scottmcm
commented
Feb 12, 2023
Looks like this is old enough that it pre-dates ACPs, so I'll nominate it for libs-api to say what they want. |
WaffleLapkin
commented
Feb 13, 2023
@camelid pretty much what the tags say: this is waiting on a |
m-ou-se
commented
Feb 28, 2023
We briefly discussed this in the libs-api meeting, and we were wondering if there are any motivating use cases. |
156c906 to
36f8693CompareChrisDenton
commented
May 2, 2023
This has passed FCP and the implementation looks good to me. The only thing I would ask for is some tests that exercise this properly. Especially because this is insta stable. Maybe doc tests? Some documentation wouldn't hurt either. E,g,, here, |
This comment has been minimized.
This comment has been minimized.
8ac5f61 to
de10516CompareChrisDenton
commented
May 3, 2023
Thanks! @bors r+ |
bors
commented
May 3, 2023
…risDenton
Implement tuple<->array convertions via `From`
This PR adds the following impls that convert between homogeneous tuples and arrays of the corresponding lengths:
```rust
impl<T> From<[T; 1]> for (T,) { ... }
impl<T> From<[T; 2]> for (T, T) { ... }
/* ... */
impl<T> From<[T; 12]> for (T, T, T, T, T, T, T, T, T, T, T, T) { ... }
impl<T> From<(T,)> for [T; 1] { ... }
impl<T> From<(T, T)> for [T; 2] { ... }
/* ... */
impl<T> From<(T, T, T, T, T, T, T, T, T, T, T, T)> for [T; 12] { ... }
```
IMO these are quite uncontroversial but note that they are, just like any other trait impls, insta-stable.…risDenton
Implement tuple<->array convertions via `From`
This PR adds the following impls that convert between homogeneous tuples and arrays of the corresponding lengths:
```rust
impl<T> From<[T; 1]> for (T,) { ... }
impl<T> From<[T; 2]> for (T, T) { ... }
/* ... */
impl<T> From<[T; 12]> for (T, T, T, T, T, T, T, T, T, T, T, T) { ... }
impl<T> From<(T,)> for [T; 1] { ... }
impl<T> From<(T, T)> for [T; 2] { ... }
/* ... */
impl<T> From<(T, T, T, T, T, T, T, T, T, T, T, T)> for [T; 12] { ... }
```
IMO these are quite uncontroversial but note that they are, just like any other trait impls, insta-stable.…risDenton
Implement tuple<->array convertions via `From`
This PR adds the following impls that convert between homogeneous tuples and arrays of the corresponding lengths:
```rust
impl<T> From<[T; 1]> for (T,) { ... }
impl<T> From<[T; 2]> for (T, T) { ... }
/* ... */
impl<T> From<[T; 12]> for (T, T, T, T, T, T, T, T, T, T, T, T) { ... }
impl<T> From<(T,)> for [T; 1] { ... }
impl<T> From<(T, T)> for [T; 2] { ... }
/* ... */
impl<T> From<(T, T, T, T, T, T, T, T, T, T, T, T)> for [T; 12] { ... }
```
IMO these are quite uncontroversial but note that they are, just like any other trait impls, insta-stable.…earth Rollup of 10 pull requests Successful merges: - rust-lang#97594 (Implement tuple<->array convertions via `From`) - rust-lang#105452 (Add cross-language LLVM CFI support to the Rust compiler) - rust-lang#105695 (Replace generic thread parker with explicit no-op parker) - rust-lang#110371 (rustdoc: restructure type search engine to pick-and-use IDs) - rust-lang#110928 (tests: Add tests for LoongArch64) - rust-lang#110970 (tidy: remove ENTRY_LIMIT maximum checking and set it to 900) - rust-lang#111104 (Update ICU4X to 1.2) - rust-lang#111127 (Constify slice flatten method) - rust-lang#111146 (rustc_middle: Fix `opt_item_ident` for non-local def ids) - rust-lang#111154 (Use builtin FFX isolation for Fuchsia test runner) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Uh oh!
There was an error while loading. Please reload this page.
Fixup "since" dates for `array_tuple_conv` feature Fixes a mistake from rust-lang#97594
Fixup "since" dates for `array_tuple_conv` feature Fixes a mistake from rust-lang#97594
This PR adds the following impls that convert between homogeneous tuples and arrays of the corresponding lengths:
IMO these are quite uncontroversial but note that they are, just like any other trait impls, insta-stable.