Skip to content

Tracking Issue for experimental yeet expressions (feature(yeet_expr)) #96373

Open
@scottmcm

Description

@scottmcm

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

  • Is this even worth having syntax for?
  • What's the right keyword for it? yeet is used for now to avoid priming any particular choice.
  • How should this work semantically?

Implementation history

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCT-langRelevant to the language team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions