Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't implement Drop with constraints #29

Open
daxpedda opened this issue Dec 9, 2021 · 0 comments
Open

Can't implement Drop with constraints #29

daxpedda opened this issue Dec 9, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@daxpedda
Copy link
Collaborator

daxpedda commented Dec 9, 2021

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 daxpedda added the enhancement New feature or request label Dec 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant