-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Description
Feature gate: #![feature(new_zeroed_alloc)]
Split-out from #63291 as a result of stabilizing most of its API! It's zeroed instead of uninit constructors, nothing too complicated!
Public API
It's new_zeroed
and new_zeroed_slice
on every major allocation type like Box, Rc, Arc.
impl<T> Box<T> { pub fn new_zeroed() -> Box<MaybeUninit<T>> {…} }
impl<T> Arc<T> { pub fn new_zeroed() -> Arc<MaybeUninit<T>> {…} }
impl<T> Rc<T> { pub fn new_zeroed() -> Rc<MaybeUninit<T>> {…} }
impl<[T]> Box<T> { pub fn new_zeroed_slice() -> Box<MaybeUninit<[T]>> {…} }
impl<[T]> Arc<T> { pub fn new_zeroed_slice() -> Arc<MaybeUninit<[T]>> {…} }
impl<[T]> Rc<T> { pub fn new_zeroed_slice() -> Rc<MaybeUninit<[T]>> {…} }
Steps / History
- Implementation: #...
- added in alloc: Add new_zeroed() versions like new_uninit(). #66128
- other API was added in Tracking issue for uninitialized constructors for Box, Rc, Arc #63291
- Final comment period (FCP)1
- Stabilization PR
Unresolved Questions
- idk lol
Footnotes
nazar-pc, viliml and thaliaarchikkysen, bjoernager, joseluis, airblast-dev, Okeyer and 2 more
Metadata
Metadata
Assignees
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.