You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is because SmallVec<&u32> contains a [&u32; 4] field directly, and the compiler choses to use one of those &u32 (which are non-zero) to set to zero to represent None in Option<SmallVec<&u32>>. However, new initializes the array with std::mem::zeroed(), which conflicts with this optimization.
This currently fails:
This is because
SmallVec<&u32>
contains a[&u32; 4]
field directly, and the compiler choses to use one of those&u32
(which are non-zero) to set to zero to representNone
inOption<SmallVec<&u32>>
. However,new
initializes the array withstd::mem::zeroed()
, which conflicts with this optimization.https://github.com/bluss/arrayvec works around this by using
#[repr(u8)]
on anenum
. (The one used to makedrop
sound, see #4.)CC @pcwalton
The text was updated successfully, but these errors were encountered: