Skip to content

Padding #935

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Padding #935

wants to merge 2 commits into from

Conversation

Havvy
Copy link
Contributor

@Havvy Havvy commented Jan 17, 2021

Fixes #882

There are two initial commits. The first one does some general cleanup while the second actually defines padding. When reviewing, review each commit in order for better understanding.

You can see that while I'm still trying to describe padding as a property of a type, I have to actually say it's a property of a value for padding from fields. Thus I filed #934. Since Size and Alignment also are similarly contorted right now, I don't think figuring what to do about this should block this PR.

Havvy added 2 commits January 16, 2021 23:49
Also a little bit of style cleanup including putting the other half
of the opening of the chapter into a note.

Also a bit of wording change. Removed "today"; Added in some of the
words that were implicit ("properties"), added "targets" after "x64".
Decided to go with the very washy "field or element can be accessed"
instead of tring to define a new term for the property since we don't
actually define what a field or element is yet.
@Havvy Havvy added A-type-layout Area: type layout New Content Missing features or aspects of language not currently documented. labels Jan 17, 2021
Comment on lines +21 to +22
If a field can be accessed, its padding is also the padding of the containing
type.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm having a little difficulty understanding this sentence. Can you elaborate on what it is saying? I've always had the impression that padding is the space between fields, not a property of the field itself. And I'm uncertain what "the padding of the containing type" is.

@rustbot
Copy link
Collaborator

rustbot commented Dec 3, 2024

☔ The latest upstream changes (possibly bf115a4) made this pull request unmergeable. Please resolve the merge conflicts.

@rustbot rustbot added the S-waiting-on-author Status: The marked PR is awaiting some action (such as code changes) from the PR author. label Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-type-layout Area: type layout New Content Missing features or aspects of language not currently documented. S-waiting-on-author Status: The marked PR is awaiting some action (such as code changes) from the PR author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Define the properties of Padding
3 participants