Tracking Issue for mem::conjure_zst
(feature(mem_conjure_zst)
)
#95383
Labels
C-tracking-issue
Category: An issue tracking the progress of sth. like the implementation of an RFC
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
Feature gate:
#![feature(mem_conjure_zst)]
This is a tracking issue for the
mem::conjure_zst::<T>()
function.There are a variety of possible ways one can do this without this function, but it provides two advantages:
It makes it clearer to the reader what's happening and keeps the code author from needing to decide between
zeroed()
oruninitialized()
orMaybeUninit::new_uninit().assume_init()
in situations likerust/library/alloc/src/vec/into_iter.rs
Lines 149 to 150 in ab0c2e1
It provides a convenient place to talk about why it's not just safe to do this in all cases.
Public API
Steps / History
mem::conjure_zst
for creating ZSTs out of nothing #95385Unresolved Questions
The text was updated successfully, but these errors were encountered: