Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/repr-rust.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ of 2.

Primitives are usually aligned to their size, although this is
platform-specific behavior. For example, on x86 `u64` and `f64` are often
aligned to 4 bytes (32 bits).
aligned to 8 bytes (64 bits).
Comment on lines 11 to +12
Copy link
Contributor

Choose a reason for hiding this comment

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

This isn't correct. On some 32-bit x86 targets, the alignment of these are indeed 32-bits. This change also doesn't make sense in the context of the rest of the paragraph, since it is contrasting situations when the alignment is not the same as the size.

Perhaps it would be clearer if it said "on 32-bit x86,".


A type's size must always be a multiple of its alignment (Zero being a valid size
for any alignment). This ensures that an array of that type may always be indexed
Expand Down