summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_error_codes/src/error_codes/E0077.md
blob: 91aa24d1f52f417b74adc9f8c9f49e3d695d06b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
A tuple struct's element isn't a machine type when using the `#[simd]`
attribute.

Erroneous code example:

```compile_fail,E0077
#![feature(repr_simd)]

#[repr(simd)]
struct Bad(String); // error!
```

When using the `#[simd]` attribute on a tuple struct, the elements in the tuple
must be machine types so SIMD operations can be applied to them.

Fixed example:

```
#![feature(repr_simd)]

#[repr(simd)]
struct Good(u32, u32, u32, u32); // ok!
```