03936115ef
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.
15 lines
270 B
Plaintext
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)]
|
|
| ^^
|
|
|