Skip to content

Conversation

@scottmcm
Copy link
Member

@scottmcm scottmcm commented Nov 9, 2025

As discussed in rust-lang/rfcs#3721 (comment), update the try in nightly to match the RFC as a way to experiment.

This addresses the following unresolved issue from #31436

Address issues with type inference (try { expr? }? currently requires an explicit type annotation somewhere).

@rustbot rustbot added O-unix Operating system: Unix-like S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Nov 9, 2025
@rustbot
Copy link
Collaborator

rustbot commented Nov 9, 2025

r? @petrochenkov

rustbot has assigned @petrochenkov.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@scottmcm scottmcm force-pushed the experiment-new-try-block-v3 branch from 88085e3 to cfbecaf Compare November 9, 2025 05:03
@scottmcm scottmcm force-pushed the experiment-new-try-block-v3 branch from cfbecaf to 86c3ba7 Compare November 9, 2025 12:19
@rustbot
Copy link
Collaborator

rustbot commented Nov 9, 2025

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.

@scottmcm scottmcm force-pushed the experiment-new-try-block-v3 branch from 8b90701 to cc7f844 Compare November 12, 2025 07:12
@petrochenkov petrochenkov added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 12, 2025
@scottmcm scottmcm added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 13, 2025
@rust-log-analyzer

This comment has been minimized.

@petrochenkov
Copy link
Contributor

error: ops::try_trait::residual_into_try_type could not be inlined into Box::<T>::try_map but is required to be inlined
note: could not be inlined due to: implementation limitation -- MIR unavailable

@petrochenkov petrochenkov added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 13, 2025
@rust-log-analyzer

This comment has been minimized.

@scottmcm scottmcm force-pushed the experiment-new-try-block-v3 branch from ae3a70e to 1e2fe0d Compare November 14, 2025 03:24
@rust-log-analyzer

This comment has been minimized.

@scottmcm scottmcm force-pushed the experiment-new-try-block-v3 branch from 1e2fe0d to e5803fc Compare November 14, 2025 03:53
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 14, 2025
@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Nov 14, 2025

📌 Commit e5803fc has been approved by petrochenkov

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 14, 2025
bors added a commit that referenced this pull request Nov 14, 2025
Rollup of 4 pull requests

Successful merges:

 - #148638 (Fix ICE for repr simd on non struct)
 - #148725 (Implement the alternative `try` block desugaring)
 - #148777 (Lock shards while emitting depth limit error.)
 - #148933 (Add note for option llvm.download-ci-llvm)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit f61bfb0 into rust-lang:main Nov 14, 2025
11 checks passed
@rustbot rustbot added this to the 1.93.0 milestone Nov 14, 2025
rust-timer added a commit that referenced this pull request Nov 14, 2025
Rollup merge of #148725 - scottmcm:experiment-new-try-block-v3, r=petrochenkov

Implement the alternative `try` block desugaring

As discussed in rust-lang/rfcs#3721 (comment), update the `try` in nightly to match the RFC as a way to experiment.

This addresses the following unresolved issue from #31436

>  Address issues with type inference (`try { expr? }?` currently requires an explicit type annotation somewhere).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

O-unix Operating system: Unix-like S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants