Tracking Issue for maybe_uninit_as_bytes · Issue #93092 · rust-lang/rust (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Description
Feature gate: #![feature(maybe_uninit_as_bytes)
This is a tracking issue for APIs which allow access to individual bytes of a MaybeUninit<T>
. This is always safe even for padding bytes since the bytes are themselves represented as MaybeUninit<u8>
.
Public API
// core::mem
impl MaybeUninit { pub fn as_bytes(&self) -> &[MaybeUninit]; pub fn as_bytes_mut(&mut self) -> &mut [MaybeUninit]; }
impl [MaybeUninit] { pub const fn as_bytes(&self) -> &[MaybeUninit]; pub const fn as_bytes_mut(&mut self) -> &mut [MaybeUninit]; }
Steps / History
- Implementation: Add MaybeUninit::(slice_)as_bytes(_mut) #89747
- Make slice methods inherent: Add inherent versions of MaybeUninit methods for slices #129259
- Final comment period (FCP)
- Stabilization PR
Unresolved Questions
- None yet.