]> git.proxmox.com Git - rustc.git/blob - src/librustc_error_codes/error_codes/E0634.md
New upstream version 1.47.0+dfsg1
[rustc.git] / src / librustc_error_codes / error_codes / E0634.md
1 A type has conflicting `packed` representation hints.
2
3 Erroneous code examples:
4
5 ```compile_fail,E0634
6 #[repr(packed, packed(2))] // error!
7 struct Company(i32);
8
9 #[repr(packed(2))] // error!
10 #[repr(packed)]
11 struct Company(i32);
12 ```
13
14 You cannot use conflicting `packed` hints on a same type. If you want to pack a
15 type to a given size, you should provide a size to packed:
16
17 ```
18 #[repr(packed)] // ok!
19 struct Company(i32);
20 ```