FIX: Use repr(C) MaybeUninitCopy after discussion with RalfJung
We have a recommendation from the unsafe-wg (no rule yet), that repr(C) for unions should work this way, so that we can cast from the union type to one of its fields.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
use array::Array;
|
||||
|
||||
#[derive(Copy, Clone)]
|
||||
#[repr(C)] // for cast from self ptr to value
|
||||
pub union MaybeUninitCopy<T>
|
||||
where T: Copy
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user