rust/src/test/ui/repr.rs
Esteban Küber 609ffa1a89 Reword malformed attribute input diagnostics
- Handle empty `cfg_attr` attribute
- Reword empty `derive` attribute error
- Use consistend error message: "malformed `attrname` attribute input"
- Provide suggestions when possible
- Move note/help to label/suggestion
- Use consistent wording "ill-formed" -> "malformed"
- Move diagnostic logic out of parser
2019-05-25 11:55:50 -07:00

14 lines
227 B
Rust

#[repr] //~ ERROR malformed `repr` attribute
struct _A {}
#[repr = "B"] //~ ERROR malformed `repr` attribute
struct _B {}
#[repr = "C"] //~ ERROR malformed `repr` attribute
struct _C {}
#[repr(C)]
struct _D {}
fn main() {}