Open vadorovsky opened 1 year ago
I believe this is duplicate of what I raised yesterday (at least both problems could be solved by the same thing): https://github.com/Lokathor/bytemuck/issues/190
I think a solution to 190 would solve this too but we can keep this issue open just in case.
Currently, bytemuck disallows to derive
Pod
if the struct has any generics:https://github.com/Lokathor/bytemuck/blob/8391afa876ba2e99dffb0c991cc7fa775287d106/derive/src/traits.rs#L55-L57
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)