Skip to content

zeroize_derive: fix derive requiring Zeroize trait in scope#1505

Open
thearyanahmed wants to merge 1 commit into
RustCrypto:masterfrom
thearyanahmed:fix/zeroize-derive-no-scope-1271
Open

zeroize_derive: fix derive requiring Zeroize trait in scope#1505
thearyanahmed wants to merge 1 commit into
RustCrypto:masterfrom
thearyanahmed:fix/zeroize-derive-no-scope-1271

Conversation

@thearyanahmed

@thearyanahmed thearyanahmed commented Jul 5, 2026

Copy link
Copy Markdown

Deriving Zeroize on a generic type failed unless the caller had use zeroize::Zeroize; in scope:

error[E0405]: cannot find trait `Zeroize` in this scope

The auto-generated where T: Zeroize bound used the bare trait name, which resolves at the call site. Everywhere else the derive writes the full ::zeroize::Zeroize path — the bound was the one place that didn't.

Fix the bound to use the full path so deriving works without importing the trait.

Tries to address #1271

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant