diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2019-11-26 13:47:06 +0100 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2019-11-27 13:18:00 +0100 |
| commit | 97a1653f09e17d36cbac6e3455a48abfd6cc2ed7 (patch) | |
| tree | 213ed8ec9a08a8d65befab283e1213f934ee3b9a | |
| parent | 843869c69020b56a61bd014226c2562037950a0f (diff) | |
| download | rust-97a1653f09e17d36cbac6e3455a48abfd6cc2ed7.tar.gz rust-97a1653f09e17d36cbac6e3455a48abfd6cc2ed7.zip | |
Clean up E0077 long explanation
| -rw-r--r-- | src/librustc_error_codes/error_codes/E0077.md | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/librustc_error_codes/error_codes/E0077.md b/src/librustc_error_codes/error_codes/E0077.md index 6ae35a6aa17..b14513c6ccf 100644 --- a/src/librustc_error_codes/error_codes/E0077.md +++ b/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! ``` |
