PhantomData
A zero-size field that tells the compiler a type uses a type parameter it doesn't store.
PhantomData
Examples
struct Id<T> { raw: u64 }fails with E0392 (Tis never used); adding_for: PhantomData<T>fixes it and adds 0 bytes.
See also
A zero-size field that tells the compiler a type uses a type parameter it doesn't store.
PhantomData
Examples
struct Id<T> { raw: u64 } fails with E0392 (T is never used); adding _for: PhantomData<T> fixes it and adds 0 bytes.
See also