Skip to content

Commit

Permalink
Clean up E0077 long explanation
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Nov 27, 2019
1 parent 843869c commit 97a1653
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/librustc_error_codes/error_codes/E0077.md
Original file line number Original file line Diff line number Diff line change
@@ -1,20 +1,23 @@
When using the `#[simd]` attribute on a tuple struct, the elements in the tuple A tuple struct's element isn't a machine type when using the `#[simd]`
must be machine types so SIMD operations can be applied to them. attribute.


This will cause an error: Erroneous code example:


```compile_fail,E0077 ```compile_fail,E0077
#![feature(repr_simd)] #![feature(repr_simd)]
#[repr(simd)] #[repr(simd)]
struct Bad(String); struct Bad(String); // error!
``` ```


This will not: When using the `#[simd]` attribute on a tuple struct, the elements in the tuple
must be machine types so SIMD operations can be applied to them.

Fixed example:


``` ```
#![feature(repr_simd)] #![feature(repr_simd)]
#[repr(simd)] #[repr(simd)]
struct Good(u32, u32, u32); struct Good(u32, u32, u32); // ok!
``` ```

0 comments on commit 97a1653

Please sign in to comment.