Skip to content

Commit ca16325

Browse files
authored
Remove ZeroizeOnDrop implementation for #[zeroize(drop)] (#715)
1 parent 5092abf commit ca16325

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

zeroize/derive/src/lib.rs

-10
Original file line numberDiff line numberDiff line change
@@ -317,17 +317,13 @@ fn derive_zeroize_with_drop(s: synstructure::Structure<'_>) -> TokenStream {
317317
}
318318
});
319319

320-
let zeroize_on_drop_impl = impl_zeroize_on_drop(&s);
321-
322320
let zeroize_impl = derive_zeroize_without_drop(s);
323321

324322
quote! {
325323
#zeroize_impl
326324

327325
#[doc(hidden)]
328326
#drop_impl
329-
330-
#zeroize_on_drop_impl
331327
}
332328
}
333329

@@ -418,12 +414,6 @@ mod tests {
418414
}
419415
}
420416
};
421-
#[allow(non_upper_case_globals)]
422-
#[doc(hidden)]
423-
const _DERIVE_zeroize_ZeroizeOnDrop_FOR_Z: () = {
424-
extern crate zeroize;
425-
impl zeroize::ZeroizeOnDrop for Z {}
426-
};
427417
}
428418
no_build // tests the code compiles are in the `zeroize` crate
429419
}

0 commit comments

Comments
 (0)