diff options
| author | Ayush Kumar Mishra <ayush.k.mishra@xcelenergy.com> | 2020-03-14 16:01:03 +0530 |
|---|---|---|
| committer | Ayush Kumar Mishra <ayush.k.mishra@xcelenergy.com> | 2020-03-14 16:01:03 +0530 |
| commit | 4bd6ebcc31bc68925742d2cb21095b5c76e7976c (patch) | |
| tree | bf7cdecf17124e426400ce32dd0d41c122bf6958 /src/librustc_error_codes/error_codes | |
| parent | 3dbade652ed8ebac70f903e01f51cd92c4e4302c (diff) | |
| download | rust-4bd6ebcc31bc68925742d2cb21095b5c76e7976c.tar.gz rust-4bd6ebcc31bc68925742d2cb21095b5c76e7976c.zip | |
Add long error explanation for E0634 #61137
Diffstat (limited to 'src/librustc_error_codes/error_codes')
| -rw-r--r-- | src/librustc_error_codes/error_codes/E0634.md | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/librustc_error_codes/error_codes/E0634.md b/src/librustc_error_codes/error_codes/E0634.md new file mode 100644 index 00000000000..5057aa6094e --- /dev/null +++ b/src/librustc_error_codes/error_codes/E0634.md @@ -0,0 +1,20 @@ +A type has conflicting `packed` representation hint. + +Erroneous code examples: + +```compile_fail,E0634 +#[repr(packed, packed(2))] // error! +struct Company(i32); + +#[repr(packed(2))] // error! +#[repr(packed)] +struct Company(i32); +``` + +You cannot use conflicting `packed` hint on a same type. If you want to pack a +type to a given size, you should provide a size to packed: + +``` +#[repr(packed)] // ok! +struct Company(i32); +``` |
