Skip to content

Conversation

@overlookmotel
Copy link
Contributor

@overlookmotel overlookmotel commented Jan 28, 2023

In the current text:

struct A(u16, u8);

A has an alignment and a size of 4

I read this as saying:

  • A has an alignment of 4 and
  • A has a size of 4

This is not correct. struct A(u16, u8) has an alignment of 2.

Perhaps it was really saying:

  • A has a specified alignment (which we don't state the value of here) and
  • A has a size of 4

This is correct, but a bit confusing.

This proposed change makes the wording less ambiguous.

@RalfJung
Copy link
Member

Good catch, thanks!

@RalfJung RalfJung merged commit 9f18694 into rust-lang:master Jan 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants