diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2020-03-16 01:30:38 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-03-16 01:30:38 +0100 |
| commit | 9296d770bd7fd5325280da86ab0c06562aa52c2d (patch) | |
| tree | 1c028480906269e1bee5106c1a2fc2ab0db5f975 /src/librustc_error_codes/error_codes | |
| parent | 56c60f290578b02221468b76d0428aa80f787f0f (diff) | |
| parent | 2974685f09d7123c1605028dc1ae2422589d0f15 (diff) | |
| download | rust-9296d770bd7fd5325280da86ab0c06562aa52c2d.tar.gz rust-9296d770bd7fd5325280da86ab0c06562aa52c2d.zip | |
Rollup merge of #69998 - ayushmishra2005:doc/61137-add-long-error-code-e0634, r=Dylan-DPC,GuillaumeGomez
Add long error explanation for E0634 Add long explanation for the E0634 error code Part of #61137 r? @GuillaumeGomez
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..0c4ed2596e2 --- /dev/null +++ b/src/librustc_error_codes/error_codes/E0634.md @@ -0,0 +1,20 @@ +A type has conflicting `packed` representation hints. + +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` hints 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); +``` |
