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
Pod requires cannot be derived for non-packed types containing \
generic parameters because the padding requirements can't be verified \
for generic non-packed structs\
However, if generics are used only as PhantomData inside #[repr(C)] struct, that should be still OK. (I ended up doing unsafe impl bytemuck::Podmyself in such cases)
The text was updated successfully, but these errors were encountered:
Currently, bytemuck disallows to derive
Pod
if the struct has any generics:bytemuck/derive/src/traits.rs
Lines 55 to 57 in 8391afa
However, if generics are used only as
PhantomData
inside#[repr(C)]
struct, that should be still OK. (I ended up doingunsafe impl bytemuck::Pod
myself in such cases)The text was updated successfully, but these errors were encountered: