diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2019-11-26 13:42:19 +0100 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2019-11-26 13:47:45 +0100 |
| commit | 2af8cd2de87322858084bfc2598e766116178b5a (patch) | |
| tree | 7e5aaf05e468928315ca3abfb9f2c6843a358366 /src/librustc_error_codes/error_codes | |
| parent | 77ecb6d44a48f079337c85962bd9f39e1c96594c (diff) | |
| download | rust-2af8cd2de87322858084bfc2598e766116178b5a.tar.gz rust-2af8cd2de87322858084bfc2598e766116178b5a.zip | |
Clean up E0075 long explanation
Diffstat (limited to 'src/librustc_error_codes/error_codes')
| -rw-r--r-- | src/librustc_error_codes/error_codes/E0075.md | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/librustc_error_codes/error_codes/E0075.md b/src/librustc_error_codes/error_codes/E0075.md index f15af8150ba..969c1ee7131 100644 --- a/src/librustc_error_codes/error_codes/E0075.md +++ b/src/librustc_error_codes/error_codes/E0075.md @@ -1,21 +1,23 @@ -The `#[simd]` attribute can only be applied to non empty tuple structs, because -it doesn't make sense to try to use SIMD operations when there are no values to -operate on. +A `#[simd]` attribute was applied to an empty tuple struct. -This will cause an error: +Erroneous code example: ```compile_fail,E0075 #![feature(repr_simd)] #[repr(simd)] -struct Bad; +struct Bad; // error! ``` -This will not: +The `#[simd]` attribute can only be applied to non empty tuple structs, because +it doesn't make sense to try to use SIMD operations when there are no values to +operate on. + +Fixed example: ``` #![feature(repr_simd)] #[repr(simd)] -struct Good(u32); +struct Good(u32); // ok! ``` |
