mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
a061e566a6
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. |
||
---|---|---|
.. | ||
benches | ||
src | ||
tests | ||
Cargo.toml |