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 - implementcatch
expressions #39849- resolve
do catch { ... }
syntax question - resolve whether catch blocks should "wrap" result value (first addressed in
catch
blocks are notOk
-wrapping their value #41414, now being settled anew in ResolvingOk
-wrapping fortry
blocks #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
Try
trait (extend?
to operate over other types rfcs#1859)- implement new
Try
trait (in place ofCarrier
) and convert?
to use it (Lower?
toTry
instead ofCarrier
#42275) - add impls for
Option
and 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
try
in 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 withmatch
instead
Metadata
Metadata
Assignees
Labels
Area: Error handlingBlocker: Approved by a merged RFC but not yet implemented.Blocker: Approved by a merged RFC and implemented but not stabilized.Blocker: Implemented in the nightly compiler and unstable.Category: An issue tracking the progress of sth. like the implementation of an RFC`#![feature(try_blocks)]`Libs issues that are tracked on the team's project board.Status: There are blocking design concerns.Relevant to the language teamRelevant to the library API team, which will review and decide on the PR/issue.