-
Notifications
You must be signed in to change notification settings - Fork 151
Description
Originally filed by @Allen-Webb as iqlusioninc/crates#651
Since often pinning is desired in conjunction with
Zeroize, it would be nice to havezeroizedefine aZeroizeimplementation forcore::marker::PhantomPinnedso that derive can be used with structs that containPhantomPinnedto prevent moving.
Originally filed by @daxpedda as iqlusioninc/crates#899
Sometimes, when you want to implement
Zeroizefor a structure that contains aPhantomDatafield, it's necessary to implementZeroizeby hand. I suggest improving this by simply implementingZeroizeforPhantomData, which should be no-op, as this has no representation data wise I believe.Alternatively, the derive proc-macro could detect
PhantomDataand skip it. I prefer the above solution though.