1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-01-05 16:10:31 +02:00

Update sizes.md (#775)

This commit is contained in:
Richard Penman 2023-06-09 14:00:33 -04:00 committed by GitHub
parent 4b7b5d83ea
commit 07a7380b13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -58,7 +58,7 @@ Key Points:
* `dbg_size!(&i32)`: size 8 bytes, align: 8 bytes (on a 64-bit machine),
* `dbg_size!(Option<&i32>)`: size 8 bytes, align: 8 bytes (null pointer optimization, see below).
* Niche optimization: Rust will merge use unused bit patterns for the enum
* Niche optimization: Rust will merge unused bit patterns for the enum
discriminant.
* Null pointer optimization: For [some