Skip to content

Instantly share code, notes, and snippets.

@jeffs
Created July 26, 2021 02:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeffs/1b3df280bbdb978b13c9636fd4e1ba59 to your computer and use it in GitHub Desktop.
Save jeffs/1b3df280bbdb978b13c9636fd4e1ba59 to your computer and use it in GitHub Desktop.
nested-type-alignment-rs-run
$ cargo run
Rust struct:
offset of a: 8 bytes
offset of b: 0 bytes
offset of c: 10 bytes
offset of d: 4 bytes
total size: 12 bytes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment