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

Docs for size_of::<#[repr(C)]> items. #44897

Merged
merged 3 commits into from Oct 1, 2017

Conversation

Projects
None yet
7 participants
@Havvy
Contributor

Havvy commented Sep 28, 2017

Most of this info comes from camlorn's blog post on optimizing struct layout and the Rustonomicon.

I don't really like my wording in the first paragraph.

I also cannot find a definition of what #[repr(C)] does for enums that have variants with fields. They're allowed, unlike #[repr(C)] enums with no variants.

Docs for size_of::<#[repr(C)]> items.
Most of this info comes from camlorn's blog post on optimizing
struct layout and the Rustonomicon.
@rust-highfive

This comment has been minimized.

Show comment
Hide comment
@rust-highfive

rust-highfive Sep 28, 2017

Collaborator

r? @aturon

(rust_highfive has picked a reviewer for you, use r? to override)

Collaborator

rust-highfive commented Sep 28, 2017

r? @aturon

(rust_highfive has picked a reviewer for you, use r? to override)

@Havvy

This comment has been minimized.

Show comment
Hide comment
@Havvy

Havvy Sep 28, 2017

Contributor

r? @steveklabnik

(Why do I always forget this?)

Contributor

Havvy commented Sep 28, 2017

r? @steveklabnik

(Why do I always forget this?)

@rust-highfive rust-highfive assigned steveklabnik and unassigned aturon Sep 28, 2017

@steveklabnik

This comment has been minimized.

Show comment
Hide comment
@steveklabnik

steveklabnik Oct 1, 2017

Member

@bors: r+ rollup

thanks! ❤️

Member

steveklabnik commented Oct 1, 2017

@bors: r+ rollup

thanks! ❤️

@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Oct 1, 2017

Contributor

📌 Commit 0ece48e has been approved by steveklabnik

Contributor

bors commented Oct 1, 2017

📌 Commit 0ece48e has been approved by steveklabnik

@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Oct 1, 2017

Contributor

⌛️ Testing commit 0ece48e with merge cef4a3e...

Contributor

bors commented Oct 1, 2017

⌛️ Testing commit 0ece48e with merge cef4a3e...

bors added a commit that referenced this pull request Oct 1, 2017

Auto merge of #44897 - Havvy:doc-size_of, r=steveklabnik
Docs for size_of::<#[repr(C)]> items.

Most of this info comes from camlorn's blog post on optimizing struct layout and the Rustonomicon.

I don't really like my wording in the first paragraph.

I also cannot find a definition of what `#[repr(C)]` does for enums that have variants with fields. They're allowed, unlike `#[repr(C)] enum`s with no variants.
@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Oct 1, 2017

Contributor

☀️ Test successful - status-appveyor, status-travis
Approved by: steveklabnik
Pushing cef4a3e to master...

Contributor

bors commented Oct 1, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: steveklabnik
Pushing cef4a3e to master...

@bors bors merged commit 0ece48e into rust-lang:master Oct 1, 2017

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details

@Havvy Havvy deleted the Havvy:doc-size_of branch Oct 2, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment