MCPcopy Create free account
hub / github.com/RustCrypto/utils / derive_enum_drop

Function derive_enum_drop

zeroize/tests/zeroize_derive.rs:75–84  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

73/// Test that the custom macro actually derived `Drop` for `Z`
74#[test]
75fn derive_enum_drop() {
76 #[allow(dead_code)]
77 #[derive(Zeroize, ZeroizeOnDrop)]
78 enum Z {
79 Variant1,
80 Variant2(usize),
81 }
82
83 assert!(core::mem::needs_drop::<Z>());
84}
85
86/// Test that the custom macro actually derived `Drop` for `Z`
87#[test]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected