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

Function zeroize_on_struct_field

zeroize_derive/src/lib.rs:619–628  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

617 #[test]
618 #[should_panic(expected = "#[zeroize(drop)] attribute is not allowed on struct fields")]
619 fn zeroize_on_struct_field() {
620 parse_zeroize_test(stringify!(
621 struct Z {
622 #[zeroize(drop)]
623 a: String,
624 b: Vec<u8>,
625 c: [u8; 3],
626 }
627 ));
628 }
629
630 #[test]
631 #[should_panic(expected = "#[zeroize(drop)] attribute is not allowed on struct fields")]

Callers

nothing calls this directly

Calls 1

parse_zeroize_testFunction · 0.85

Tested by

no test coverage detected