-
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
Partially stabilize maybe_uninit_extra
#92768
Conversation
This covers: impl<T> MaybeUninit<T> { pub unsafe fn assume_init_read(&self) -> T { ... } pub unsafe fn assume_init_drop(&mut self) { ... } } It does not cover the const-ness of `write` under `const_maybe_uninit_write` nor the const-ness of `assume_init_read` (this commit adds `const_maybe_uninit_assume_init_read` for that). FCP: rust-lang#63567 (comment). Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
(rust-highfive has picked a reviewer for you, use r? to override) |
It looks like the FCP included the const-ness of MaybeUninit::write -- was that excluded for a reason? |
Not the person who created the PR, but
|
Ah, ok. That makes sense. @bors r+ rollup |
📌 Commit 8680a44 has been approved by |
Exactly, plus
I did not try since it was not part of the FCP, but from a quick test, we would need |
… r=Mark-Simulacrum Partially stabilize `maybe_uninit_extra` This covers: ```rust impl<T> MaybeUninit<T> { pub unsafe fn assume_init_read(&self) -> T { ... } pub unsafe fn assume_init_drop(&mut self) { ... } } ``` It does not cover the const-ness of `write` under `const_maybe_uninit_write` nor the const-ness of `assume_init_read` (this commit adds `const_maybe_uninit_assume_init_read` for that). FCP: rust-lang#63567 (comment). Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
… r=Mark-Simulacrum Partially stabilize `maybe_uninit_extra` This covers: ```rust impl<T> MaybeUninit<T> { pub unsafe fn assume_init_read(&self) -> T { ... } pub unsafe fn assume_init_drop(&mut self) { ... } } ``` It does not cover the const-ness of `write` under `const_maybe_uninit_write` nor the const-ness of `assume_init_read` (this commit adds `const_maybe_uninit_assume_init_read` for that). FCP: rust-lang#63567 (comment). Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
…askrgr Rollup of 9 pull requests Successful merges: - rust-lang#92045 (Don't fall back to crate-level opaque type definitions.) - rust-lang#92381 (Suggest `return`ing tail expressions in async functions) - rust-lang#92768 (Partially stabilize `maybe_uninit_extra`) - rust-lang#92810 (Deduplicate box deref and regular deref suggestions) - rust-lang#92818 (Update documentation for doc_cfg feature) - rust-lang#92840 (Fix some lints documentation) - rust-lang#92849 (Clippyup) - rust-lang#92854 (Use the updated Rust logo in rustdoc) - rust-lang#92864 (Fix a missing dot in the main item heading) Failed merges: - rust-lang#92838 (Clean up some links in RELEASES) r? `@ghost` `@rustbot` modify labels: rollup
…it_assume_init_read, r=dtolnay Stabilize `const_maybe_uninit_assume_init_read` AFAICT the only reason this was not included in the `maybe_uninit_extra` stabilization was because `ptr::read` was unstable (rust-lang#92768 (comment)), which has since been stabilized in 1.71. Needs a separate FCP from the [original `maybe_uninit_extra` one](rust-lang#63567 (comment)). Tracking issue: rust-lang#63567
…_init_read, r=dtolnay Stabilize `const_maybe_uninit_assume_init_read` AFAICT the only reason this was not included in the `maybe_uninit_extra` stabilization was because `ptr::read` was unstable (rust-lang/rust#92768 (comment)), which has since been stabilized in 1.71. Needs a separate FCP from the [original `maybe_uninit_extra` one](rust-lang/rust#63567 (comment)). Tracking issue: #63567
This covers:
It does not cover the const-ness of
write
underconst_maybe_uninit_write
nor the const-ness ofassume_init_read
(this commit addsconst_maybe_uninit_assume_init_read
for that).FCP: #63567 (comment).
Signed-off-by: Miguel Ojeda ojeda@kernel.org