Closed
Description
If you have following tuple struct:
#[derive(Zeroize, ZeroizeOnDrop)]
struct MyNum(u8);
The build fails with the following error:
#[derive(Zeroize, ZeroizeOnDrop)]
^^^^^^^ invalid suffix `usize`
This may be because the generated implementation looks like this:
impl Zeroize for MyNum {
fn zeroize(&mut self) {
self.0usize.zeroize()
}
}
Possible reasons:
Recently, this pull request was merged: rust-lang/rust#59421 which introduced this regression: rust-lang/rust#59553
Playground: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=1fdfb92bcacca661092abdce42cf8810