Tracking Issue for maybe_uninit_fill (original) (raw)

Feature gate: #![feature(maybe_uninit_fill)]

This is a tracking issue for ACP rust-lang/libs-team#156

Public API

// core::mem

impl<T> MaybeUninit<T> {
    pub fn fill<'a>(this: &'a mut [MaybeUninit<T>], value: T) -> &'a mut [T]
    where
        T: Clone;

    pub fn fill_with<'a, F>(this: &'a mut [MaybeUninit<T>], mut f: F) -> &'a mut [T]
    where
        F: FnMut() -> T;

    pub fn fill_from<'a, I>(
        this: &'a mut [MaybeUninit<T>],
        it: I,
    ) -> (&'a mut [T], &'a mut [MaybeUninit<T>])
    where
        I: IntoIterator<Item = T>;
}

Steps / History

Unresolved Questions

  1. https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html