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 .
33
4- This will cause an error :
4+ Erroneous code example :
55
66``` compile_fail,E0077
77#![feature(repr_simd)]
88
99#[repr(simd)]
10- struct Bad(String);
10+ struct Bad(String); // error!
1111```
1212
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:
1417
1518```
1619#![feature(repr_simd)]
1720
1821#[repr(simd)]
19- struct Good(u32, u32, u32);
22+ struct Good(u32, u32, u32); // ok!
2023```
You can’t perform that action at this time.
0 commit comments