()
| 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() { |
nothing calls this directly
no test coverage detected