rust/src/test/ui/issue-47094.stderr
Robin Kruppe 03936115ef Check all repr hints together when checking for mis-applied attributes
Fixes #47094

Besides fixing that bug, this change has a user-visible effect on the spans in the "incompatible repr hints" warning and another error: they now point at `foo` and/or `bar` in `repr(foo, bar)` instead of the whole attribute. This is sometimes more precise (e.g., `#[repr(C, packed)]` on an enum points at the `packed`) but sometimes not. I moved a compile-fail test to a ui test to illustrate how it now looks in the common case of only one attribute.
2018-01-01 22:05:29 +01:00

15 lines
270 B
Plaintext

warning[E0566]: conflicting representation hints
--> $DIR/issue-47094.rs:13:8
|
13 | #[repr(C,u8)]
| ^ ^^
warning[E0566]: conflicting representation hints
--> $DIR/issue-47094.rs:19:8
|
19 | #[repr(C)]
| ^
20 | #[repr(u8)]
| ^^