Skip to content

Commit 0b491a1

Browse files
committed
Auto merge of #51441 - bstrie:sizeof128, r=dtolnay
Document size_of for 128-bit integers 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)
2 parents a561ea7 + 9a8fa2c commit 0b491a1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/libcore/mem.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,12 @@ pub fn forget<T>(t: T) {
194194
/// u16 | 2
195195
/// u32 | 4
196196
/// u64 | 8
197+
/// u128 | 16
197198
/// i8 | 1
198199
/// i16 | 2
199200
/// i32 | 4
200201
/// i64 | 8
202+
/// i128 | 16
201203
/// f32 | 4
202204
/// f64 | 8
203205
/// char | 4

0 commit comments

Comments
 (0)