]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_error_codes/src/error_codes/E0076.md
Rollup merge of #92310 - ehuss:rustdoc-ice, r=estebank
[rust.git] / compiler / rustc_error_codes / src / error_codes / E0076.md
1 All types in a tuple struct aren't the same when using the `#[simd]`
2 attribute.
3
4 Erroneous code example:
5
6 ```compile_fail,E0076
7 #![feature(repr_simd)]
8
9 #[repr(simd)]
10 struct Bad(u16, u32, u32 u32); // error!
11 ```
12
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:
18
19 ```
20 #![feature(repr_simd)]
21
22 #[repr(simd)]
23 struct Good(u32, u32, u32, u32); // ok!
24 ```