Skip to content
Permalink
Browse files

Clean up E0076 long explanation

  • Loading branch information
GuillaumeGomez committed Nov 26, 2019
1 parent 2af8cd2 commit 843869c69020b56a61bd014226c2562037950a0f
Showing with 10 additions and 7 deletions.
  1. +10 −7 src/librustc_error_codes/error_codes/E0076.md
@@ -1,21 +1,24 @@
When using the `#[simd]` attribute to automatically use SIMD operations in tuple
struct, the types in the struct must all be of the same type, or the compiler
will trigger this error.
All types in a tuple struct aren't the same when using the `#[simd]`
attribute.

This will cause an error:
Erroneous code example:

```compile_fail,E0076
#![feature(repr_simd)]
#[repr(simd)]
struct Bad(u16, u32, u32);
struct Bad(u16, u32, u32); // error!
```

This will not:
When using the `#[simd]` attribute to automatically use SIMD operations in tuple
struct, the types in the struct must all be of the same type, or the compiler
will trigger this error.

Fixed example:

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

0 comments on commit 843869c

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