Open
Description
Tracking issue for rust-lang/rfcs#243 and rust-lang/rfcs#1859.
Implementation concerns:
-
?operator that is roughly equivalent totry!- implement the?operator #31954 -
try { ... }expression - implementcatchexpressions #39849- resolve
do catch { ... }syntax question - resolve whether catch blocks should "wrap" result value (first addressed in
catchblocks are notOk-wrapping their value #41414, now being settled anew in ResolvingOk-wrapping fortryblocks #70941) - Add a test confirming that it's an
ExprWithBlock, so works in a match arm without a comma - Address issues with type inference (
try { expr? }?currently requires an explicit type annotation somewhere).
- resolve
- settle design of the
Trytrait (extend?to operate over other types rfcs#1859)- implement new
Trytrait (in place ofCarrier) and convert?to use it (Lower?toTryinstead ofCarrier#42275) - add impls for
Optionand so forth, and a suitable family of tests (Impl Try for Option #42526) - improve error messages as described in the RFC (Improve
?error messages per RFC 1859 #35946)
- implement new
- reserve
tryin new edition - block
try{}catch(or other following idents) to leave design space open for the future, and point people to how to do what they want withmatchinstead
Metadata
Assignees
Labels
Area: Error handlingBlocker: Approved by a merged RFC but not yet implemented.Blocker: Approved by a merged RFC and implemented.Blocker: Implemented in the nightly compiler and unstable.Category: A tracking issue for an RFC or an unstable feature.`#![feature(try_blocks)]`Libs issues that are tracked on the team's project board.Status: There are blocking ❌ design concerns.Relevant to the language team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Activity