diff --git a/zeroize/src/lib.rs b/zeroize/src/lib.rs index 1166d83c..06335b7e 100644 --- a/zeroize/src/lib.rs +++ b/zeroize/src/lib.rs @@ -796,9 +796,10 @@ unsafe fn volatile_set(dst: *mut T, src: T, count: usize) { } /// Zeroizes a flat type/struct. Only zeroizes the values that it owns, and it does not work on -/// dynamically sized values or trait objects. +/// dynamically sized values or trait objects. Do not use this function on a type that already +/// implements `ZeroizeOnDrop`. /// -/// ## Safety: +/// # Safety: /// - The type must not contain references to outside data or dynamically sized data /// - This function can invalidate the type if it is used after this function is called on it. It is /// advisable to call this method in `impl Drop`.