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

Function derive_struct_only_drop

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

Source from the content-addressed store, hash-verified

86/// Test that the custom macro actually derived `Drop` for `Z`
87#[test]
88fn derive_struct_only_drop() {
89 #[derive(ZeroizeOnDrop)]
90 struct Z([u8; 3]);
91
92 assert!(core::mem::needs_drop::<Z>());
93}
94
95/// Test that the custom macro actually derived `Drop` for `Z`
96#[test]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected