-
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
Tracking Issue for const_replace #83164
Comments
This comment was marked as resolved.
This comment was marked as resolved.
status on this? is any help needed? |
@rust-lang/libs-api I think this is ready to be stabilized, given that const_mut_refs is in FCP. :) This is about const-stabilizing two already-stable functions: mod mem {
pub const fn replace<T>(dest: &mut T, src: T) -> T;
}
mod ptr {
pub const unsafe fn replace<T>(dst: *mut T, mut src: T) -> T;
} |
@rfcbot fcp merge |
Team member @dtolnay has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
@Amanieu @BurntSushi @joshtriplett @m-ou-se would be nice to get this (and some of the other |
🔔 This is now entering its final comment period, as per the review above. 🔔 |
The final comment period, with a disposition to merge, as per the review above, is now complete. As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed. This will be merged soon. |
…-fn, r=RalfJung Stabilize const `ptr::write*` and `mem::replace` Since `const_mut_refs` and `const_refs_to_cell` have been stabilized, we may now also stabilize the ability to write to places during const evaluation inside our library API. So, we now propose the `const fn` version of `ptr::write` and its variants. This allows us to also stabilize `mem::replace` and `ptr::replace`. - const `mem::replace`: rust-lang#83164 (comment) - const `ptr::write{,_bytes,_unaligned}`: rust-lang#86302 (comment) Their implementation requires an additional internal stabilization of `const_intrinsic_forget`, which is required for `*::write*` and thus `*::replace`. Thus we const-stabilize the internal intrinsics `forget`, `write_bytes`, and `write_via_move`.
Rollup merge of rust-lang#130954 - workingjubilee:stabilize-const-mut-fn, r=RalfJung Stabilize const `ptr::write*` and `mem::replace` Since `const_mut_refs` and `const_refs_to_cell` have been stabilized, we may now also stabilize the ability to write to places during const evaluation inside our library API. So, we now propose the `const fn` version of `ptr::write` and its variants. This allows us to also stabilize `mem::replace` and `ptr::replace`. - const `mem::replace`: rust-lang#83164 (comment) - const `ptr::write{,_bytes,_unaligned}`: rust-lang#86302 (comment) Their implementation requires an additional internal stabilization of `const_intrinsic_forget`, which is required for `*::write*` and thus `*::replace`. Thus we const-stabilize the internal intrinsics `forget`, `write_bytes`, and `write_via_move`.
Feature gate:
#![feature(const_replace)]
This is a tracking issue for making the functions
mem::replace
andptr::replace
const fn
.Public API
Steps / History
copy
related functions #83091ptr::write*
andmem::replace
#130954Unresolved Questions
The text was updated successfully, but these errors were encountered: