summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_error_codes/src/error_codes/E0587.md
blob: ee9031dc3796c7a8189acc76dc2117337ed53b9d (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)] // ok!
struct Umbrella(i32);
```