Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

basic chapter for representation of unions #39

Merged
merged 2 commits into from
Oct 25, 2018

Conversation

RalfJung
Copy link
Member

Fixes #13

@RalfJung RalfJung mentioned this pull request Oct 24, 2018
reference/src/representation/unions.md~ Outdated Show resolved Hide resolved
reference/src/representation/unions.md Show resolved Hide resolved
@nikomatsakis
Copy link
Contributor

@RalfJung maybe it's worth noting that #[repr(C)] is probably also needed for ABI compatibility when invoking functions (although at present I expect we are de facto compatible).

@RalfJung
Copy link
Member Author

maybe it's worth noting that #[repr(C)] is probably also needed for ABI compatibility when invoking functions (although at present I expect we are de facto compatible).

Not sure what you mean. Are you just saying "to pass unions by value to C, they need to be repr(C)"? But isn't that true for anything? Might still be worth repeating, as long as we make sure it is also state in every FFI guide as well as in the struct and enum chapters.

@avadacatavra avadacatavra merged commit 8245b0b into rust-lang:master Oct 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants