Tracking Issue for Vec::from_fn (original) (raw)
Feature gate: #![feature(vec_from_fn)]
This is a tracking issue for the Vec::from_fn method.
Public API
impl Vec { pub fn from_fn(length: usize, f: F) -> Self where F: FnMut(usize) -> T, { (0..length).map(f).collect() } }
Steps / History
(Remember to update the S-tracking-* label when checking boxes.)
- ACP: Support vec![const { ... }; n] syntax for creating a Vec of non-Clone values libs-team#484 (comment)
- Implementation: Implement Vec::from_fn #149699
- Final comment period (FCP)1
- Stabilization PR
Unresolved Questions
- None yet.