Skip to content

Commit

Permalink
Document size_of for 128-bit integers
Browse files Browse the repository at this point in the history
We might want to consider separately documenting the alignment of
primitives, rather than just their size, since 128-bit integers, unlike
all other primitives, have an alignment that is not identical to their
size (size_of is 16, align_of is 8)
  • Loading branch information
bstrie committed Jun 8, 2018
1 parent 1b4c921 commit 9a8fa2c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/libcore/mem.rs
Expand Up @@ -194,10 +194,12 @@ pub fn forget<T>(t: T) {
/// u16 | 2
/// u32 | 4
/// u64 | 8
/// u128 | 16
/// i8 | 1
/// i16 | 2
/// i32 | 4
/// i64 | 8
/// i128 | 16
/// f32 | 4
/// f64 | 8
/// char | 4
Expand Down

0 comments on commit 9a8fa2c

Please sign in to comment.