Skip to content

Add sound implementation of Bytes for &[u8] #308

@Thomasdezeeuw

Description

@Thomasdezeeuw

See rust-lang/rfcs#2930 (comment) and rust-lang/rfcs#2930 (comment).

Example:

let mut buf = [0u8];
let maybe = unsafe { &mut *((&mut buf) as *mut [u8] as *mut [MaybeUninit<u8>]) };
// After this line `buf` will contain uninitialized value, which is UB
maybe[0] = MaybeUninit::uninit();

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions