cargo-semver-checks icon indicating copy to clipboard operation
cargo-semver-checks copied to clipboard

Handle combined repr attributes like `#[repr(C, u8)]` in repr checks

Open obi1kenobi opened this issue 2 years ago • 0 comments

https://rust-lang.github.io/unsafe-code-guidelines/layout/enums.html#explicit-repr-annotation-with-c-compatibility image

Currently, I suspect that #[repr(C, u8)] won't get detected as either #[repr(C)] or as #[repr(u8)], which I believe can lead to both false-positives and false-negatives. Due to the false-positives, this is a bug.

H/t https://twitter.com/bitshiftmask/status/1562185690208735233 + a private Twitter account I'm not going to name, you know who you are :) Thank you both!

obi1kenobi avatar Aug 23 '22 22:08 obi1kenobi