File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
src/librustc_error_codes/error_codes Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change 1
- The ` #[simd] ` attribute can only be applied to non empty tuple structs, because
2
- it doesn't make sense to try to use SIMD operations when there are no values to
3
- operate on.
1
+ A ` #[simd] ` attribute was applied to an empty tuple struct.
4
2
5
- This will cause an error :
3
+ Erroneous code example :
6
4
7
5
``` compile_fail,E0075
8
6
#![feature(repr_simd)]
9
7
10
8
#[repr(simd)]
11
- struct Bad;
9
+ struct Bad; // error!
12
10
```
13
11
14
- This will not:
12
+ The ` #[simd] ` attribute can only be applied to non empty tuple structs, because
13
+ it doesn't make sense to try to use SIMD operations when there are no values to
14
+ operate on.
15
+
16
+ Fixed example:
15
17
16
18
```
17
19
#![feature(repr_simd)]
18
20
19
21
#[repr(simd)]
20
- struct Good(u32);
22
+ struct Good(u32); // ok!
21
23
```
You can’t perform that action at this time.
0 commit comments