Skip to content

Commit 2d329f1

Browse files
Merge pull request #244 from iqlusioninc/zeroize/deprecate-no-drop
zeroize_derive: Deprecate `#[zeroize(no_drop)]` attribute
2 parents b0443a0 + 481ff4d commit 2d329f1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

zeroize_derive/src/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,10 @@ impl DeriveAttrs {
7777
if ident == "drop" {
7878
self.set_drop_flag(true);
7979
} else if ident == "no_drop" {
80-
self.set_drop_flag(false);
80+
eprintln!(
81+
"warning: use of deprecated attribute #[zeroize(no_drop)]: \
82+
has no effect and will be removed in zeroize 1.0"
83+
);
8184
} else {
8285
panic!("unknown #[zeroize] attribute type: {}", ident);
8386
}

0 commit comments

Comments
 (0)