Specifically, I have an ArrayVec<core::task::Waker, 15>. Waker is two pointers, and len is 32 bits. On 64-bit platforms, in theory, Option<ArrayVec<...>> could have the same size.
But padding cannot be used to hold discriminants unless you explicitly allocate said padding.
I think this would require some compile-time selection based on the alignment of T. Not urgent, but something I noticed when examining code generation.
Specifically, I have an
ArrayVec<core::task::Waker, 15>.Wakeris two pointers, andlenis 32 bits. On 64-bit platforms, in theory,Option<ArrayVec<...>>could have the same size.But padding cannot be used to hold discriminants unless you explicitly allocate said padding.
I think this would require some compile-time selection based on the alignment of T. Not urgent, but something I noticed when examining code generation.