Skip to content

Conversation

@daxpedda
Copy link
Contributor

@daxpedda daxpedda commented Aug 1, 2022

I don't actually know how to test this, because you can't access the dropped memory of a Box without a custom allocator I suppose (EDIT: same for Vec). So I just made sure it builds.

I'm also not a 100% sure my assumption is correct, but as far as I understand any Drop bounds are truly unnecessary in this case.

Fixes #786.

@daxpedda daxpedda changed the title Fix deriving ZeroizeOnDrop on fields with Box Fix deriving ZeroizeOnDrop on items with generics Aug 3, 2022
@daxpedda daxpedda force-pushed the zeroize-on-drop-box branch from c49f779 to 57e9868 Compare August 3, 2022 07:18
@tarcieri tarcieri merged commit 81536ee into RustCrypto:master Aug 3, 2022
@tarcieri
Copy link
Member

tarcieri commented Aug 3, 2022

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ZeroizeOnDrop derivation does not work for a Box<T> field

2 participants