Conflicting representation hints have been used on a same item.
Erroneous code example:
#![allow(unused)]
fn main() {
#[repr(u32, u64)]
enum Repr { A }
} In most cases (if not all), using just one representation hint is more than enough. If you want to have a representation hint depending on the current architecture, use cfg_attr. Example:
#![allow(unused)]
fn main() {
#[cfg_attr(linux, repr(u32))]
#[cfg_attr(not(linux), repr(u64))]
enum Repr { A }
}
© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/error_codes/E0566.html