Skip to content

Commit 47b681d

Browse files
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.
2 parents 743623d + d232d09 commit 47b681d

File tree

2 files changed

+0
-2
lines changed

2 files changed

+0
-2
lines changed

Diff for: clippy_lints/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#![feature(array_windows)]
22
#![feature(binary_heap_into_iter_sorted)]
33
#![feature(box_patterns)]
4-
#![feature(control_flow_enum)]
54
#![feature(f128)]
65
#![feature(f16)]
76
#![feature(if_let_guard)]

Diff for: clippy_utils/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#![feature(array_chunks)]
22
#![feature(box_patterns)]
3-
#![feature(control_flow_enum)]
43
#![feature(f128)]
54
#![feature(f16)]
65
#![feature(if_let_guard)]

0 commit comments

Comments
 (0)