A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/rust-lang/rust/issues/129396 below:

Tracking Issue for `new_zeroed_alloc` · Issue #129396 · rust-lang/rust · GitHub

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 Unresolved Questions
  1. https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html

nazar-pc, viliml and thaliaarchikkysen, bjoernager, joseluis, airblast-dev, Okeyer and 2 more


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4