-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 the map
/value
methods on ControlFlow
#130518
Conversation
r? @ibraheemdev rustbot has assigned @ibraheemdev. Use |
dd1caed
to
2de809f
Compare
This comment has been minimized.
This comment has been minimized.
2de809f
to
ce0541e
Compare
r? libs-api |
This comment has been minimized.
This comment has been minimized.
Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
This comment has been minimized.
This comment has been minimized.
7c4c9ce
to
e7b5805
Compare
This comment has been minimized.
This comment has been minimized.
e7b5805
to
4c8ea84
Compare
#[unstable(feature = "control_flow_enum", reason = "new API", issue = "75744")] | ||
#[stable(feature = "control_flow_enum_type", since = "1.55.0")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wanted to draw attention to this update specifically. The type has been stable for a while https://blog.rust-lang.org/2021/09/09/Rust-1.55.0.html#stabilized-apis, so I guess this attribute just wasn't doing anything. I set the since
to the same old release as the type.
@rfcbot fcp merge |
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. |
🔔 This is now entering its final comment period, as per the review above. 🔔 |
☔ The latest upstream changes (presumably #130803) made this pull request unmergeable. Please resolve the merge conflicts. |
And fix the stability attribute on the `pub use` in `core::ops`.
4c8ea84
to
ddfd0c7
Compare
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. |
@bors r=dtolnay |
…ra, r=dtolnay Stabilize the `map`/`value` methods on `ControlFlow` And fix the stability attribute on the `pub use` in `core::ops`. libs-api in rust-lang#75744 (comment) seemed reasonably happy with naming for these, so let's try for an FCP. Summary: ```rust impl<B, C> ControlFlow<B, C> { pub fn break_value(self) -> Option<B>; pub fn map_break<T>(self, f: impl FnOnce(B) -> T) -> ControlFlow<T, C>; pub fn continue_value(self) -> Option<C>; pub fn map_continue<T>(self, f: impl FnOnce(C) -> T) -> ControlFlow<B, T>; } ``` Resolves rust-lang#75744 `@rustbot` label +needs-fcp +t-libs-api -t-libs --- Aside, in case it keeps someone else from going down the same dead end: I looked at the `{break,continue}_value` methods and tried to make them `const` as part of this, but that's disallowed because of not having `const Drop`, so put it back to not even unstably-const.
…kingjubilee Rollup of 10 pull requests Successful merges: - rust-lang#130453 (Add x86_64-unknown-trusty as tier 3 target) - rust-lang#130518 (Stabilize the `map`/`value` methods on `ControlFlow`) - rust-lang#131116 (Increase Stack Size for AIX) - rust-lang#131171 (Fix `target_env` in `avr-unknown-gnu-atmega328`) - rust-lang#131174 (Fix `target_abi` in `sparc-unknown-none-elf`) - rust-lang#131177 ( Stabilize 5 `const_mut_refs`-dependent API) - rust-lang#131238 (Remove mw from triagebot.toml) - rust-lang#131240 (Fix typo in csky-unknown-linux-gnuabiv2.md) - rust-lang#131257 ([rustdoc] Fix list margins) - rust-lang#131264 (Fix some `pub(crate)` that were undetected bc of `#[instrument]`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#130518 - scottmcm:stabilize-controlflow-extra, r=dtolnay Stabilize the `map`/`value` methods on `ControlFlow` And fix the stability attribute on the `pub use` in `core::ops`. libs-api in rust-lang#75744 (comment) seemed reasonably happy with naming for these, so let's try for an FCP. Summary: ```rust impl<B, C> ControlFlow<B, C> { pub fn break_value(self) -> Option<B>; pub fn map_break<T>(self, f: impl FnOnce(B) -> T) -> ControlFlow<T, C>; pub fn continue_value(self) -> Option<C>; pub fn map_continue<T>(self, f: impl FnOnce(C) -> T) -> ControlFlow<B, T>; } ``` Resolves rust-lang#75744 ``@rustbot`` label +needs-fcp +t-libs-api -t-libs --- Aside, in case it keeps someone else from going down the same dead end: I looked at the `{break,continue}_value` methods and tried to make them `const` as part of this, but that's disallowed because of not having `const Drop`, so put it back to not even unstably-const.
…ra, r=dtolnay Stabilize the `map`/`value` methods on `ControlFlow` And fix the stability attribute on the `pub use` in `core::ops`. libs-api in rust-lang#75744 (comment) seemed reasonably happy with naming for these, so let's try for an FCP. Summary: ```rust impl<B, C> ControlFlow<B, C> { pub fn break_value(self) -> Option<B>; pub fn map_break<T>(self, f: impl FnOnce(B) -> T) -> ControlFlow<T, C>; pub fn continue_value(self) -> Option<C>; pub fn map_continue<T>(self, f: impl FnOnce(C) -> T) -> ControlFlow<B, T>; } ``` Resolves rust-lang#75744 ``@rustbot`` label +needs-fcp +t-libs-api -t-libs --- Aside, in case it keeps someone else from going down the same dead end: I looked at the `{break,continue}_value` methods and tried to make them `const` as part of this, but that's disallowed because of not having `const Drop`, so put it back to not even unstably-const.
And fix the stability attribute on the
pub use
incore::ops
.libs-api in #75744 (comment) seemed reasonably happy with naming for these, so let's try for an FCP.
Summary:
Resolves #75744
@rustbot label +needs-fcp +t-libs-api -t-libs
Aside, in case it keeps someone else from going down the same dead end: I looked at the
{break,continue}_value
methods and tried to make themconst
as part of this, but that's disallowed because of not havingconst Drop
, so put it back to not even unstably-const.