-
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 box_vec_non_null
#130364
Comments
One thing I wanted to bring up here in terms of the "parts" name: I think Spitballing, what about something like this impl<T, A> Vec<T, A> {
pub const unsafe fn from_parts(buffer: Box<[MaybeUninit<T>], A>, initialized: RangeTo<usize>) -> Self;
pub const fn into_parts(self) -> (Box<[MaybeUninit<T>], A>, RangeTo<usize>);
} where it's no longer possible to accidentally get the capacity and length -- which have the same type, so the compiler doesn't help! -- in the wrong order. And the precondition for And it doesn't need to have a separate function for an allocator-aware version because dealing in |
…trieb Add `Vec::as_non_null` Implements the ACP: rust-lang/libs-team#440 The documentation is mostly copied from the existing `Vec::as_mut_ptr` method. I am adding this method to the already-existing `box_vec_non_null` feature tracked at rust-lang#130364.
Rollup merge of rust-lang#130624 - theemathas:vec_as_non_null, r=Noratrieb Add `Vec::as_non_null` Implements the ACP: rust-lang/libs-team#440 The documentation is mostly copied from the existing `Vec::as_mut_ptr` method. I am adding this method to the already-existing `box_vec_non_null` feature tracked at rust-lang#130364.
Add `Vec::as_non_null` Implements the ACP: rust-lang/libs-team#440 The documentation is mostly copied from the existing `Vec::as_mut_ptr` method. I am adding this method to the already-existing `box_vec_non_null` feature tracked at rust-lang/rust#130364.
Feature gate:
#![feature(box_vec_non_null)]
This is a tracking issue for convenience methods for conversion between
NonNull
andVec
/Box
.Public API
Steps / History
NonNull
convenience methods toBox
andVec
#130061Vec::as_non_null()
method libs-team#440Vec::as_non_null
#130624Unresolved Questions
Footnotes
https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html ↩
The text was updated successfully, but these errors were encountered: