derive-where icon indicating copy to clipboard operation
derive-where copied to clipboard

Can't implement `Drop` with constraints

Open daxpedda opened this issue 3 years ago • 0 comments

I didn't know this about Rust, but apparently you can't implement Drop unless the item you are implementing it for uses the same constraints, e.g. you can't specialize your Drop implementation by adding a where clause that doesn't exists on the item definition.

https://doc.rust-lang.org/error-index.html#E0367

Will have to explore this further. Nothing wrong with derive-where, but a better error message could help. This only applies to Zeroize(drop) or ZeroizeOnDrop with #32, no other traits are affected.

daxpedda avatar Dec 09 '21 18:12 daxpedda