split try trait in twain#154715
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
709df2d to
cb71243
Compare
This comment has been minimized.
This comment has been minimized.
|
rust-analyzer is developed in its own repository. If possible, consider making this change to rust-lang/rust-analyzer instead. cc @rust-lang/rust-analyzer Some changes occurred to the CTFE / Miri interpreter cc @rust-lang/miri, @RalfJung, @oli-obk, @lcnr Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
|
r? @jhpratt rustbot has assigned @jhpratt. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
@rustbot reroll |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
@rustbot reroll |
This comment has been minimized.
This comment has been minimized.
|
The job Click to see the possible cause of the failure (guessed by this bot) |
|
I know there has been a bunch of discussion about improvements to Try (e.g., something about GATs making the API friendlier), but it's not obvious to me that we want to try to further generalize it. I think it would make sense for T-libs to discuss this and figure out what the right path forward is before we spend more time on review / iteration on the specifics of the PR. |
|
☔ The latest upstream changes (presumably #157208) made this pull request unmergeable. Please resolve the merge conflicts. |
View all comments
https://rust-lang.zulipchat.com/#narrow/channel/219381-t-libs/topic/on.20.60Try.60.20for.20.60.26Option.60/with/582974682
currently
Tryfor&Optionis impossible, because from_output would need to return &Option from &Self::Output. but i think there should be some way to doOption::as_refin a generic setting, and i think this is a good cause to split the traits up a bit, like so:which then allows (this is not implemented in this PR.)
which then allows
which then allows
which i think is a great boon to
Try.