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

Function derive_zeroize_with_marker

zeroize/tests/zeroize_derive.rs:349–362  ·  view source on GitHub ↗

Issue https://github.com/RustCrypto/utils/issues/878

()

Source from the content-addressed store, hash-verified

347#[allow(unused_assignments)]
348// Issue https://github.com/RustCrypto/utils/issues/878
349fn derive_zeroize_with_marker() {
350 #[derive(ZeroizeOnDrop, Zeroize)]
351 struct Test<A: Marker> {
352 #[zeroize(skip)]
353 field: Option<A>,
354 }
355
356 #[allow(dead_code)]
357 trait Secret: ZeroizeOnDrop + Zeroize {}
358
359 impl<A: Marker> Secret for Test<A> {}
360
361 trait Marker {}
362}
363
364#[test]
365#[allow(dead_code)]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected