reference
reference copied to clipboard
Improve documentation of `repr(transparent)`
The documentation was a bit unclear, and after reading it, it was unclear to me what a concrete example of the behaviour described by the following sentence was:
This is different than the C representation because a struct with the C representation will always have the ABI of a C struct while, for example, a struct with the transparent representation with a primitive field will have the ABI of the primitive field.
Agreed that it was mostly due to my lack of knowledge when it comes to ABIs, but I found my answers reading the corresponding RFC and thought it would be appropriate to partly import the description of the motivation from it. I found it clear enough so I kept the wording as is and merely copy pasted selected parts, I believe it doesn't raise license issues.