Suggestion for incorrect repr
use
#61286
Labels
A-attributes
Area: Attributes (`#[…]`, `#![…]`)
A-diagnostics
Area: Messages for errors, warnings, and lints
A-repr
Area: the `#[repr(stuff)]` attribute
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
D-papercut
Diagnostics: An error or lint that needs small tweaks.
P-low
Low priority
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
When encountering
#[repr = "C"]
, suggest#[repr(C)]
instead of the current#[repr(C, packed, ...)]
. We need to detect specific cases like writing#[repr("packed")]
, where we should suggest#[repr(packed)]
, as otherwise provide a list of all the validrepr
s.(Follow up to #61140)
The text was updated successfully, but these errors were encountered: