Description
This is the summary issue for a bug fix related to repr(...)
hints. The goal of this page is describe why this change was made and how you can fix code that is affected by it. It also provides a place to ask questions or register a complaint if you feel the change should not be made. For more information on the policy around future-compatibility warnings, see our breaking change policy guidelines.
What is the warning for?
The compiler incorrectly accepts #[repr(...)]
hints on data types where the hints are incompatible and have conflicts. Examples of this includes:
// from `src/test/ui/conflicting-repr-hints.rs
#[repr(u32, u64)] //~ ERROR conflicting representation hints
enum D {
D,
}
We are presently issuing a deny-by-default lint when conflicting representation hints are used together but we expect to transition the lint to hard errors in the future.
How can you fix your code?
Generally speaking, the conflict should be fixed by more clearly expressing your intent so that the conflict is resolved.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status