Tracking Issue for maybe_uninit_fill
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(maybe_uninit_fill)]
This is a tracking issue for ACP https://github.com/rust-lang/libs-team/issues/156
Public API
// in core
impl<T> [MaybeUninit<T>] {
pub fn write_filled(&mut self, value: T) -> &mut [T]
where
T: Clone;
pub fn write_with<F>(&mut self, mut f: F) -> &mut [T]
where
F: FnMut(usize) -> T;
pub fn write_iter<I>(&mut self, it: I) -> (&mut [T], &mut [MaybeUninit<T>])
where
I: IntoIterator<Item = T>;
}
Steps / History
- Implementation: https://github.com/rust-lang/rust/pull/117426, https://github.com/rust-lang/rust/pull/121280
- Make slice methods inherent: https://github.com/rust-lang/rust/pull/135394
- Final comment period (FCP)^1
- Stabilization PR
Unresolved Questions
- Naming: these were originally named
fill,fill_with, andfill_fromto be consistent consistent withslice::{fill_with,fill_from}. Since changing to slice-inherent methods, these needed to be renamed to avoid conflict. Should we change to naming that keepsfill? Amanieu suggestedfill_initat https://github.com/rust-lang/rust/pull/129259#issuecomment-2501783702.
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 the public API and the linked implementation PRs for the maybe_uninit_fill feature gate. Review the unresolved naming question and the stabilization lifecycle guidance; done means resolving the open design work, completing the final comment period, and preparing the stabilization PR.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100