rust-lang / rust-lang/rust

Tracking Issue for `#![feature(control_flow_ok)]`

Open
#140,266 11 comments 0 reactions 1 assignee View on GitHub

@jogru0 is already working on this.

Since Apr 24, 2025.

C-tracking-issue disposition-merge finished-final-comment-period T-libs
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

Feature gate: #![feature(control_flow_ok)]

This is a tracking issue for ControlFlow::continue_ok and ControlFlow::break_ok, as proposed in https://github.com/rust-lang/libs-team/issues/444.

(The other part of this ACP was already implemented in https://github.com/rust-lang/rust/pull/137449.)

Public API
impl<B, C> ControlFlow<B, C> { 
    const fn continue_ok(self) -> Result<C, B>;
    const fn break_ok(self) -> Result<B, C>;
}
Steps / History

(Remember to update the S-tracking-* label when checking boxes.)

  • Implementation: #140267
  • Final comment period (FCP)^1
  • Stabilization PR
Unresolved Questions
  • None yet.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.