Tracking Issue for experimental yeet expressions (feature(yeet_expr)) · Issue #96373 · rust-lang/rust (original) (raw)

This is a tracking issue for experimenting with the "throw expression" idea from RFC#0243.
The feature gate for the issue is #![feature(yeet_expr)].

Per the lang process, this cannot go further than experimenting without an approved RFC -- and will certainly not stabilize under the name yeet. Please try this out and give experience reports, but be aware that it may well change drastically or be removed entirely.

Currently the primary purpose of the feature is to ensure that redesigns of the Try trait (#84277) are compatible with potentially doing this in the future, and secondarily to experiment with whether this is worth having as an expression, or whether it should be removed in favour of a pure-library approach.

Because the do yeet syntax is explicitly temporary, do not expect various ecosystem tools to support it, especially not those which have stability promises.

Lang initiative: rust-lang/lang-team#160
Tracking issue for standard library additions: #96374

About tracking issues

Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.

Steps

Unresolved Questions

Implementation history