summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_error_codes/src/error_codes/E0587.md
blob: d7998af85b94fc71c9c142abe46b9bbb9c4a06e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
A type has both `packed` and `align` representation hints.

Erroneous code example:

```compile_fail,E0587
#[repr(packed, align(8))] // error!
struct Umbrella(i32);
```

You cannot use `packed` and `align` hints on a same type. If you want to pack a
type to a given size, you should provide a size to packed:

```
#[repr(packed(8))] // ok!
struct Umbrella(i32);
```