Stabilize box_vec_non_null#157226
Conversation
|
An additional issue: Should EDIT: It could also be |
|
Just cataloguing the similar methods from rustdoc:
from_parts/into_parts: (proposed)
I think that The only other methods in libstd that use the term "parts" are Would say that maybe we should not label any "parts" as canonical for now at least, since it's not clear what version would be best to use. |
|
cc @rust-lang/opsem - is there a reason on your end to make |
|
Team member @joshtriplett has proposed to merge this. The next step is review by the rest of the tagged team members: Concerns:
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. |
|
Which exact function is this about? EDIT: I assume Though given that the returned pointer is meant to be mutable, my personal preference would be |
|
I like these. I'm concerned about the @rfcbot concern |
Closes #130364
r? libs-api
What's being stabilized
The following is being stabilized in this PR:
Note that
Vec::from_partsandVec::into_partsremain const-unstable behind theconst_heapfeature (likeVec::from_raw_partsandVec::into_raw_parts). However,Vec::as_non_nullwill become const-stable (likeVec::as_ptr).The following APIs remain gated behind
allocator_apiImplementation History
Most of this feature was ACP'ed in rust-lang/libs-team#418, and implemented in #130061.
Vec::as_non_nullwas ACP'ed separately in rust-lang/libs-team#440, and implemented in #130624.Potential issues
Vec::from_partsandVec::into_partsbe the name used for this? Or should those names be used for functions that take/returnBox<[MaybeUninit<T>]>? (Raised at Tracking Issue forbox_vec_non_null#130364 (comment))non_nullornonnull? (Raised at Tracking Issue forbox_vec_non_null#130364 (comment). Seemem::Alignment: Naming the-> NonZero<usize>method. #154237 (comment).)Veccollide with anything via autoderef?