]> git.proxmox.com Git - rustc.git/blame - compiler/rustc_error_codes/src/error_codes/E0076.md
Merge tag 'debian/1.52.1+dfsg1-1_exp2' into proxmox/buster
[rustc.git] / compiler / rustc_error_codes / src / error_codes / E0076.md
CommitLineData
60c5eb7d
XL
1All types in a tuple struct aren't the same when using the `#[simd]`
2attribute.
3
4Erroneous code example:
5
6```compile_fail,E0076
7#![feature(repr_simd)]
8
9#[repr(simd)]
6a06907d 10struct Bad(u16, u32, u32 u32); // error!
60c5eb7d
XL
11```
12
13When using the `#[simd]` attribute to automatically use SIMD operations in tuple
14struct, the types in the struct must all be of the same type, or the compiler
15will trigger this error.
16
17Fixed example:
18
19```
20#![feature(repr_simd)]
21
22#[repr(simd)]
6a06907d 23struct Good(u32, u32, u32, u32); // ok!
60c5eb7d 24```