]> git.proxmox.com Git - rustc.git/blob - src/librustc_error_codes/error_codes/E0077.md
New upstream version 1.47.0+dfsg1
[rustc.git] / src / librustc_error_codes / error_codes / E0077.md
1 A tuple struct's element isn't a machine type when using the `#[simd]`
2 attribute.
3
4 Erroneous code example:
5
6 ```compile_fail,E0077
7 #![feature(repr_simd)]
8
9 #[repr(simd)]
10 struct Bad(String); // error!
11 ```
12
13 When using the `#[simd]` attribute on a tuple struct, the elements in the tuple
14 must be machine types so SIMD operations can be applied to them.
15
16 Fixed example:
17
18 ```
19 #![feature(repr_simd)]
20
21 #[repr(simd)]
22 struct Good(u32, u32, u32); // ok!
23 ```