about summary refs log tree commit diff
path: root/compiler/rustc_interface/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-09-29 20:17:36 +0200
committerGitHub <noreply@github.com>2024-09-29 20:17:36 +0200
commita061e566a6f3baf831c7785ad31f03f6f2a0d7a0 (patch)
tree8f85fc778634f57324592839e1367463a48c6a92 /compiler/rustc_interface/src
parentc1e54cfa402f2beff92d6f2aa4c7a5060a0df0ef (diff)
parente1c09ec9a5285193be90aa77ce0ebbad9b76bb66 (diff)
downloadrust-a061e566a6f3baf831c7785ad31f03f6f2a0d7a0.tar.gz
rust-a061e566a6f3baf831c7785ad31f03f6f2a0d7a0.zip
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.
Diffstat (limited to 'compiler/rustc_interface/src')
0 files changed, 0 insertions, 0 deletions