Skip to content

Fix alignment description for u64 and f64 in repr-rust.md#514

Open
Riahiamirreza wants to merge 1 commit intorust-lang:masterfrom
Riahiamirreza:patch-1
Open

Fix alignment description for u64 and f64 in repr-rust.md#514
Riahiamirreza wants to merge 1 commit intorust-lang:masterfrom
Riahiamirreza:patch-1

Conversation

@Riahiamirreza
Copy link

No description provided.

Comment on lines 11 to +12
platform-specific behavior. For example, on x86 `u64` and `f64` are often
aligned to 4 bytes (32 bits).
aligned to 8 bytes (64 bits).
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,".

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.

2 participants

Comments