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.
4
3
5
- This will cause an error :
4
+ Erroneous code example :
6
5
7
6
``` compile_fail,E0076
8
7
#![feature(repr_simd)]
9
8
10
9
#[repr(simd)]
11
- struct Bad(u16, u32, u32);
10
+ struct Bad(u16, u32, u32); // error!
12
11
```
13
12
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:
15
18
16
19
```
17
20
#![feature(repr_simd)]
18
21
19
22
#[repr(simd)]
20
- struct Good(u32, u32, u32);
23
+ struct Good(u32, u32, u32); // ok!
21
24
```
You can’t perform that action at this time.
0 commit comments