Tracking Issue for `new_zeroed_alloc`
Open
Nobody has claimed this yet.
C-tracking-issue
T-libs
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Feature gate: #![feature(new_zeroed_alloc)]
Split-out from https://github.com/rust-lang/rust/issues/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 https://github.com/rust-lang/rust/pull/66128
- other API was added in https://github.com/rust-lang/rust/issues/63291
- Final comment period (FCP)^1
- Stabilization PR
Unresolved Questions
- idk lol
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with implementation PR #66128 and the feature lifecycle stabilization guide linked in the issue. Review the listed new_zeroed and new_zeroed_slice APIs on Box, Arc, and Rc, then determine the remaining stabilization steps. Done means completing the final comment period and a stabilization PR.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100