blob: 688bfd3e72795f66780430429b33e2d06388d9ac (
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; 2]); // 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; 4]); // ok!
```
|