rust/library/core
Matthias Krüger a061e566a6
Rollup merge of #130972 - RalfJung:const_cell_into_inner, r=dtolnay
stabilize const_cell_into_inner

This const-stabilizes
- `UnsafeCell::into_inner`
- `Cell::into_inner`
- `RefCell::into_inner`
- `OnceCell::into_inner`

`@rust-lang/wg-const-eval` this uses `rustc_allow_const_fn_unstable(const_precise_live_drops)`, so we'd be comitting to always finding *some* way to accept this code. IMO that's fine -- what these functions do is to move out the only field of a struct, and that struct has no destructor itself. The field's destructor does not get run as it gets returned to the caller.

`@rust-lang/libs-api` this was FCP'd already [years ago](https://github.com/rust-lang/rust/issues/78729#issuecomment-811409860), except that  `OnceCell::into_inner` was added to the same feature gate since then (Cc `@tgross35).` Does that mean we have to re-run the FCP? If yes, I'd honestly prefer to move `OnceCell` into its own feature gate to not risk missing the next release. (That's why it's not great to add new functions to an already FCP'd feature gate.) OTOH if this needs an FCP either way since the previous FCP was so long ago, then we might as well do it all at once.
2024-09-29 20:17:36 +02:00
..
benches Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
src Rollup merge of #130972 - RalfJung:const_cell_into_inner, r=dtolnay 2024-09-29 20:17:36 +02:00
tests stabilize const_cell_into_inner 2024-09-28 11:29:02 +02:00
Cargo.toml Port std library to RTEMS 2024-09-03 09:19:29 +02:00