Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stabilize ControlFlow::{is_break, is_continue} #91091

Merged
merged 1 commit into from
Dec 13, 2021

Conversation

ecstatic-morse
Copy link
Contributor

The type itself was stabilized in 1.55, but using it is not ergonomic without these helper functions. Stabilize them.

r? rust-lang/libs-api

@rust-highfive
Copy link
Collaborator

r? @dtolnay

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 20, 2021
@inquisitivecrystal
Copy link
Contributor

Random extremely minor comment: control_flow_enum_is feels a bit weird to read as a feature name. I'm expecting to find something else after the "is". I understand the reasoning, and at the end of the day it's not like users are going to need to turn on a stabilized feature, but it still seems a bit suboptimal.

@inquisitivecrystal inquisitivecrystal added A-control-flow Area: Relating to control flow needs-fcp This change is insta-stable, so needs a completed FCP to proceed. relnotes Marks issues that should be documented in the release notes of the next release. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Nov 20, 2021
@scottmcm scottmcm added the I-libs-api-nominated The issue / PR has been nominated for discussion during a libs-api team meeting. label Nov 22, 2021
@dtolnay dtolnay removed the I-libs-api-nominated The issue / PR has been nominated for discussion during a libs-api team meeting. label Nov 26, 2021
@dtolnay
Copy link
Member

dtolnay commented Nov 26, 2021

@rust-lang/libs-api:
@rfcbot fcp merge

impl<B, C> ControlFlow<B, C> {
    pub fn is_break(&self) -> bool;
    pub fn is_continue(&self) -> bool;
}

The ControlFlow type has been stable since #85608:

pub enum ControlFlow<B, C = ()> {
    Continue(C),
    Break(B),
}

@rfcbot
Copy link

rfcbot commented Nov 26, 2021

Team member @dtolnay has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@rfcbot rfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. and removed proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. labels Nov 26, 2021
@rfcbot
Copy link

rfcbot commented Dec 2, 2021

🔔 This is now entering its final comment period, as per the review above. 🔔

@rfcbot rfcbot added finished-final-comment-period The final comment period is finished for this PR / Issue. to-announce Announce this issue on triage meeting and removed final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. labels Dec 12, 2021
@rfcbot
Copy link

rfcbot commented Dec 12, 2021

The final comment period, with a disposition to merge, as per the review above, is now complete.

As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed.

This will be merged soon.

@m-ou-se
Copy link
Member

m-ou-se commented Dec 12, 2021

@bors r+

@bors
Copy link
Contributor

bors commented Dec 12, 2021

📌 Commit 7ba4acc has been approved by m-ou-se

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 12, 2021
@camelid
Copy link
Member

camelid commented Dec 12, 2021

@bors rollup

bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 13, 2021
…askrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#91086 (Implement `TryFrom<&'_ mut [T]>` for `[T; N]`)
 - rust-lang#91091 (Stabilize `ControlFlow::{is_break, is_continue}`)
 - rust-lang#91749 (BTree: improve public descriptions and comments)
 - rust-lang#91819 (rustbot: Add autolabeling for `T-compiler`)
 - rust-lang#91824 (Make `(*mut T)::write_bytes` `const`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 6227d42 into rust-lang:master Dec 13, 2021
@rustbot rustbot added this to the 1.59.0 milestone Dec 13, 2021
@apiraino apiraino removed the to-announce Announce this issue on triage meeting label Dec 16, 2021
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Feb 24, 2022
…lan-DPC

remove feature gate in control_flow examples

Stabilization was done in rust-lang#91091, but the two examples weren't updated accordingly.

Probably too late to put it into stable, but it should be in the next release :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-control-flow Area: Relating to control flow disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. needs-fcp This change is insta-stable, so needs a completed FCP to proceed. relnotes Marks issues that should be documented in the release notes of the next release. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet