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