File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
src/librustc_error_codes/error_codes Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change 1
- When using the ` #[simd] ` attribute on a tuple struct, the elements in the tuple
2
- must be machine types so SIMD operations can be applied to them .
1
+ A tuple struct's element isn't a machine type when using the ` #[simd] `
2
+ attribute .
3
3
4
- This will cause an error :
4
+ Erroneous code example :
5
5
6
6
``` compile_fail,E0077
7
7
#![feature(repr_simd)]
8
8
9
9
#[repr(simd)]
10
- struct Bad(String);
10
+ struct Bad(String); // error!
11
11
```
12
12
13
- This will not:
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:
14
17
15
18
```
16
19
#![feature(repr_simd)]
17
20
18
21
#[repr(simd)]
19
- struct Good(u32, u32, u32);
22
+ struct Good(u32, u32, u32); // ok!
20
23
```
You can’t perform that action at this time.
0 commit comments