Skip to content

Support heterogeneous try blocks (try_blocks_heterogeneous) RFC#3953

Open
MusicalNinjaDad wants to merge 24 commits intorust-lang:masterfrom
MusicalNinjaDad:first_draft
Open

Support heterogeneous try blocks (try_blocks_heterogeneous) RFC#3953
MusicalNinjaDad wants to merge 24 commits intorust-lang:masterfrom
MusicalNinjaDad:first_draft

Conversation

@MusicalNinjaDad
Copy link
Copy Markdown

@MusicalNinjaDad MusicalNinjaDad commented Apr 21, 2026

RFC 3721 implemented default support for homogeneous try {...} blocks, where all ?s return the same error type. This RFC aims to provide support for explicit annotation of the returned error type from a try {...} block.

Note

This RFC provides post-hoc documentation of the current status-quo to act as an anchor point for moving forwards and a consolidation point for historical comments across multiple tickets. The changes described are already implemented in nightly as described.

This is created at the request of the implementor (@scottmcm) based on a brief zulip chat and written in a way to mimic those RFCs that I, as a nightly user, find valuable.

Important

Since RFCs involve many conversations at once that can be difficult to follow, please use review comment threads on the text changes instead of direct comments on the RFC.

If you don't have a particular section of the RFC to comment on, you can click on the "Comment on this file" button on the top-right corner of the diff, to the right of the "Viewed" checkbox. This will create a separate thread even if others have commented on the file too.

r? @scottmcm

Rendered

Comment thread text/0000-try-blocks-heterogeneous.md
Comment thread text/0000-try-blocks-heterogeneous.md Outdated
thanks @kennytm

Co-authored-by: kennytm <kennytm@gmail.com>
@ehuss ehuss added T-lang Relevant to the language team, which will review and decide on the RFC. T-libs-api Relevant to the library API team, which will review and decide on the RFC. labels Apr 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-lang Relevant to the language team, which will review and decide on the RFC. T-libs-api Relevant to the library API team, which will review and decide on the RFC.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants