rust/library
Jubilee 5a8fcab713
Rollup merge of #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 https://github.com/rust-lang/rust/issues/75744#issuecomment-2231214910 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 #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.
2024-10-04 14:11:34 -07:00
..
alloc Avoid emptiness check in PeekMut::pop 2024-10-03 22:15:52 +08:00
backtrace@230570f2da Try latest backtrace 2024-08-29 12:13:19 -07:00
core Rollup merge of #130518 - scottmcm:stabilize-controlflow-extra, r=dtolnay 2024-10-04 14:11:34 -07:00
panic_abort step cfg(bootstrap) 2024-07-28 14:46:29 -04:00
panic_unwind library: Compute RUST_EXCEPTION_CLASS from native-endian bytes 2024-09-26 11:34:17 -07:00
portable-simd stabilize const_intrinsic_copy 2024-09-23 22:12:54 +02:00
proc_macro Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
profiler_builtins Don't skip nonexistent source files 2024-08-27 17:30:42 +10:00
rtstartup Let InstCombine remove Clone shims inside Clone shims 2024-07-25 15:14:42 -04:00
rustc-std-workspace-alloc
rustc-std-workspace-core
rustc-std-workspace-std
std Rollup merge of #131163 - JakenHerman:master, r=Nadrieril 2024-10-03 13:47:59 +02:00
stdarch@ace72223a0 Fix up standard library intro 2024-09-23 09:21:39 -07:00
sysroot Auto merge of #125016 - nicholasbishop:bishop-cb-112, r=tgross35 2024-07-29 07:41:33 +00:00
test Dogfood feature(file_buffered) 2024-09-24 14:25:16 -07:00
unwind Use &raw in the standard library 2024-09-25 17:03:20 -07:00
windows_targets Win: Add dbghelp to the list of import libraries 2024-09-06 21:21:49 +00:00
Cargo.lock Update hashbrown to 0.15 and adjust some methods 2024-10-02 09:44:51 +02:00
Cargo.toml Auto merge of #129063 - the8472:cold-opt-size, r=Amanieu 2024-09-02 00:58:50 +00:00