()
| 95 | /// Test that the custom macro actually derived `Drop` for `Z` |
| 96 | #[test] |
| 97 | fn derive_enum_only_drop() { |
| 98 | #[allow(dead_code)] |
| 99 | #[derive(ZeroizeOnDrop)] |
| 100 | enum Z { |
| 101 | Variant1, |
| 102 | Variant2(usize), |
| 103 | } |
| 104 | |
| 105 | assert!(core::mem::needs_drop::<Z>()); |
| 106 | } |
| 107 | |
| 108 | /// Test that `Drop` is not derived in the following case by defining a |
| 109 | /// `Drop` impl which should conflict if the custom derive defined one too |
nothing calls this directly
no outgoing calls
no test coverage detected