summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_error_codes/src/error_codes/E0566.md
blob: 3dcd801a21a6d8ba4eabbe61d605cd24ddf65447 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Conflicting representation hints have been used on a same item.

Erroneous code example:

```compile_fail,E0566
#[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:

```
#[cfg_attr(linux, repr(u32))]
#[cfg_attr(not(linux), repr(u64))]
enum Repr { A }
```