Clean up E0075 long explanation
This commit is contained in:
parent
77ecb6d44a
commit
2af8cd2de8
1 changed files with 9 additions and 7 deletions
|
|
@ -1,21 +1,23 @@
|
|||
The `#[simd]` attribute can only be applied to non empty tuple structs, because
|
||||
it doesn't make sense to try to use SIMD operations when there are no values to
|
||||
operate on.
|
||||
A `#[simd]` attribute was applied to an empty tuple struct.
|
||||
|
||||
This will cause an error:
|
||||
Erroneous code example:
|
||||
|
||||
```compile_fail,E0075
|
||||
#![feature(repr_simd)]
|
||||
|
||||
#[repr(simd)]
|
||||
struct Bad;
|
||||
struct Bad; // error!
|
||||
```
|
||||
|
||||
This will not:
|
||||
The `#[simd]` attribute can only be applied to non empty tuple structs, because
|
||||
it doesn't make sense to try to use SIMD operations when there are no values to
|
||||
operate on.
|
||||
|
||||
Fixed example:
|
||||
|
||||
```
|
||||
#![feature(repr_simd)]
|
||||
|
||||
#[repr(simd)]
|
||||
struct Good(u32);
|
||||
struct Good(u32); // ok!
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue