diff options
Diffstat (limited to 'vendor/zeroize/tests')
-rw-r--r-- | vendor/zeroize/tests/zeroize_derive.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/vendor/zeroize/tests/zeroize_derive.rs b/vendor/zeroize/tests/zeroize_derive.rs index 4e0fdc61c..96c10c325 100644 --- a/vendor/zeroize/tests/zeroize_derive.rs +++ b/vendor/zeroize/tests/zeroize_derive.rs @@ -315,3 +315,13 @@ fn derive_deref() { } assert_eq!(&value.0 .0, &[0, 0, 0]) } + +#[test] +#[cfg(feature = "alloc")] +fn derive_zeroize_on_drop_generic() { + #[derive(ZeroizeOnDrop)] + struct Y<T: Zeroize>(Box<T>); + + #[derive(ZeroizeOnDrop)] + struct Z<T: Zeroize>(Vec<T>); +} |