Skip to content

Commit 2af8cd2

Browse files
Clean up E0075 long explanation
1 parent 77ecb6d commit 2af8cd2

File tree

1 file changed

+9
-7
lines changed
  • src/librustc_error_codes/error_codes

1 file changed

+9
-7
lines changed
Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
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.
42

5-
This will cause an error:
3+
Erroneous code example:
64

75
```compile_fail,E0075
86
#![feature(repr_simd)]
97
108
#[repr(simd)]
11-
struct Bad;
9+
struct Bad; // error!
1210
```
1311

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:
1517

1618
```
1719
#![feature(repr_simd)]
1820
1921
#[repr(simd)]
20-
struct Good(u32);
22+
struct Good(u32); // ok!
2123
```

0 commit comments

Comments
 (0)