Skip to content

Commit 843869c

Browse files
Clean up E0076 long explanation
1 parent 2af8cd2 commit 843869c

File tree

1 file changed

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

1 file changed

+10
-7
lines changed
Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
1-
When using the `#[simd]` attribute to automatically use SIMD operations in tuple
2-
struct, the types in the struct must all be of the same type, or the compiler
3-
will trigger this error.
1+
All types in a tuple struct aren't the same when using the `#[simd]`
2+
attribute.
43

5-
This will cause an error:
4+
Erroneous code example:
65

76
```compile_fail,E0076
87
#![feature(repr_simd)]
98
109
#[repr(simd)]
11-
struct Bad(u16, u32, u32);
10+
struct Bad(u16, u32, u32); // error!
1211
```
1312

14-
This will not:
13+
When using the `#[simd]` attribute to automatically use SIMD operations in tuple
14+
struct, the types in the struct must all be of the same type, or the compiler
15+
will trigger this error.
16+
17+
Fixed example:
1518

1619
```
1720
#![feature(repr_simd)]
1821
1922
#[repr(simd)]
20-
struct Good(u32, u32, u32);
23+
struct Good(u32, u32, u32); // ok!
2124
```

0 commit comments

Comments
 (0)