Skip to main content

REPEATED_REPRS

Static REPEATED_REPRS 

Source
pub static REPEATED_REPRS: &Lint
Expand description

The repeated_reprs lint detects when the same representation is specified more than once in a #[repr(..)] attribute.

§Example

#[repr(C)]
#[repr(C)]
enum Foo { A }

{{produces}}

§Explanation

While some representations may be specified more than once, the compiler will reject repeated uses of some others. For consistency, prefer to only specify the representation once.