Skip to content
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

Describe bit validity and padding for primitive types #1291

Closed
joshlf opened this issue Nov 2, 2022 · 0 comments · Fixed by #1392
Closed

Describe bit validity and padding for primitive types #1291

joshlf opened this issue Nov 2, 2022 · 0 comments · Fixed by #1392
Labels
A-type-layout Area: type layout

Comments

@joshlf
Copy link
Contributor

joshlf commented Nov 2, 2022

Though it's generally understood to be the case, the type layout page of the reference doesn't explicitly guarantee that, for each primitive type, T:

  • All bit patterns are valid instances of T
  • All of the bytes of T are guaranteed to be initialized (none of them are padding)
@ehuss ehuss added the A-type-layout Area: type layout label Jun 27, 2023
joshlf added a commit to joshlf/reference that referenced this issue Aug 11, 2023
Specify the bit validity and padding of the primitive numeric 
types, bool, char, and pointer and reference types.

Closes rust-lang#1291
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment