-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
stabilize const_cell_into_inner #130972
stabilize const_cell_into_inner #130972
Conversation
r? @ibraheemdev rustbot has assigned @ibraheemdev. Use |
This comment has been minimized.
This comment has been minimized.
Seems to be something with cranelift?
Cc @bjorn3 |
The |
I would be happy to approve this including
Please try deleting these lines: rust/compiler/rustc_codegen_cranelift/patches/0027-stdlib-128bit-atomic-operations.patch Lines 85 to 97 in a1fd235
|
Some changes occurred in compiler/rustc_codegen_cranelift cc @bjorn3 |
@bors r+ |
…iaskrgr Rollup of 4 pull requests Successful merges: - rust-lang#123932 (restate GlobalAlloc method safety preconditions in terms of what the caller has to do for greater clarity) - rust-lang#129003 (Improve Ord docs) - rust-lang#130972 (stabilize const_cell_into_inner) - rust-lang#130990 (try to get rid of mir::Const::normalize) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#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](rust-lang#78729 (comment)), 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.
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, 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 moveOnceCell
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.