Allow deriving `Pod` for structs where generics are used only as `PhantomData`
Opened this issue · 2 comments
vadorovsky commented
Currently, bytemuck disallows to derive Pod
if the struct has any generics:
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 doing unsafe impl bytemuck::Pod
myself in such cases)
wdanilo commented
I believe this is duplicate of what I raised yesterday (at least both problems could be solved by the same thing): #190
Lokathor commented
I think a solution to 190 would solve this too but we can keep this issue open just in case.