Skip to content
Permalink
Browse files

Clean up E0077 long explanation

  • Loading branch information
GuillaumeGomez committed Nov 26, 2019
1 parent 843869c commit 97a1653f09e17d36cbac6e3455a48abfd6cc2ed7
Showing with 9 additions and 6 deletions.
  1. +9 −6 src/librustc_error_codes/error_codes/E0077.md
@@ -1,20 +1,23 @@
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.
A tuple struct's element isn't a machine type when using the `#[simd]`
attribute.

This will cause an error:
Erroneous code example:

```compile_fail,E0077
#![feature(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)]
#[repr(simd)]
struct Good(u32, u32, u32);
struct Good(u32, u32, u32); // ok!
```

0 comments on commit 97a1653

Please sign in to comment.
You can’t perform that action at this time.