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

Function zeroize_with_bound

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

Source from the content-addressed store, hash-verified

537
538 #[test]
539 fn zeroize_with_bound() {
540 test_derive(
541 derive_zeroize_impl,
542 quote! {
543 #[zeroize(bound = "T: MyTrait")]
544 struct Z<T>(T);
545 },
546 quote! {
547 impl<T> ::zeroize::Zeroize for Z<T> where T: MyTrait {
548 fn zeroize(&mut self) {
549 match self {
550 #[allow(unused_variables, unused_assignments)]
551 Z(__zeroize_field_0) => {
552 __zeroize_field_0.zeroize()
553 }
554 _ => {}
555 }
556 }
557 }
558 },
559 );
560 }
561
562 #[test]
563 fn zeroize_only_drop() {

Callers

nothing calls this directly

Calls 1

test_deriveFunction · 0.85

Tested by

no test coverage detected