-
Notifications
You must be signed in to change notification settings - Fork 14k
Implement the alternative try block desugaring
#148725
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
rustbot has assigned @petrochenkov. Use |
This comment has been minimized.
This comment has been minimized.
74cc941 to
88085e3
Compare
This comment has been minimized.
This comment has been minimized.
88085e3 to
cfbecaf
Compare
cfbecaf to
86c3ba7
Compare
|
This PR was rebased onto a different master 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. |
8b90701 to
cc7f844
Compare
|
|
||
| bb3: { | ||
| _0 = <Option<Infallible> as Residual<u32>>::into_try_type(const Option::<Infallible>::None) -> [return: bb4, unwind unreachable]; | ||
| _0 = <Option<u32> as FromResidual<Option<Infallible>>>::from_residual(const Option::<Infallible>::None) -> [return: bb4, unwind unreachable]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the rustc_force_inline this is no longer different, as it's always MIR-inlined.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...or maybe not because rustc_force_inline doesn't work in CI #148915
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does in work locally but not on CI? Very strange.
I'd expect this error to happen because residual_into_try_type is not marked as reachable from other crates for some reason (I thought lang items were always assumed to be reachable). What happens if it's publicly reexported?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it all built just fine locally, though admittedly I didn't run all the tests so I might have missed something.
Making it exported-but-unstable is a good idea; I'll give that a shot and see! Thanks.
|
The job Click to see the possible cause of the failure (guessed by this bot) |
|
As discussed in rust-lang/rfcs#3721 (comment), update the
tryin nightly to match the RFC as a way to experiment.This addresses the following unresolved issue from #31436