diff --git a/zeroize/derive/src/lib.rs b/zeroize/derive/src/lib.rs index 6c61f2f2..fc4e1a5b 100644 --- a/zeroize/derive/src/lib.rs +++ b/zeroize/derive/src/lib.rs @@ -14,12 +14,13 @@ decl_derive!( /// Derive the `Zeroize` trait. /// - /// Supports the following attribute: + /// Supports the following attributes: /// - /// - `#[zeroize(drop)]`: derives the `Drop` trait, calling `zeroize()` - /// when this item is dropped. - /// - `#[zeroize(skip)]`: skips this field or variant when calling - /// `zeroize()`. + /// On the item level: + /// - `#[zeroize(drop)]`: call `zeroize()` when this item is dropped + /// + /// On the field level: + /// - `#[zeroize(skip)]`: skips this field or variant when calling `zeroize()` derive_zeroize ); diff --git a/zeroize/src/lib.rs b/zeroize/src/lib.rs index 28ee5420..3af212da 100644 --- a/zeroize/src/lib.rs +++ b/zeroize/src/lib.rs @@ -66,10 +66,14 @@ //! which automatically calls `zeroize()` on all members of a struct //! or tuple struct. //! -//! Additionally it supports the following attribute: +//! Additionally it supports the following attributes: //! +//! On the item level: //! - `#[zeroize(drop)]`: call `zeroize()` when this item is dropped //! +//! On the field level: +//! - `#[zeroize(skip)]`: skips this field or variant when calling `zeroize()` +//! //! Example which derives `Drop`: //! //! ```