File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
src/librustc_error_codes/error_codes Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change 1- When using the ` #[simd] ` attribute to automatically use SIMD operations in tuple
2- struct, the types in the struct must all be of the same type, or the compiler
3- will trigger this error.
1+ All types in a tuple struct aren't the same when using the ` #[simd] `
2+ attribute.
43
5- This will cause an error :
4+ Erroneous code example :
65
76``` compile_fail,E0076
87#![feature(repr_simd)]
98
109#[repr(simd)]
11- struct Bad(u16, u32, u32);
10+ struct Bad(u16, u32, u32); // error!
1211```
1312
14- This will not:
13+ When using the ` #[simd] ` attribute to automatically use SIMD operations in tuple
14+ struct, the types in the struct must all be of the same type, or the compiler
15+ will trigger this error.
16+
17+ Fixed example:
1518
1619```
1720#![feature(repr_simd)]
1821
1922#[repr(simd)]
20- struct Good(u32, u32, u32);
23+ struct Good(u32, u32, u32); // ok!
2124```
You can’t perform that action at this time.
0 commit comments