about summary refs log tree commit diff
path: root/library/core/src/alloc/layout.rs
diff options
context:
space:
mode:
authorThe Miri Cronjob Bot <miri@cron.bot>2024-04-24 05:04:52 +0000
committerThe Miri Cronjob Bot <miri@cron.bot>2024-04-24 05:04:52 +0000
commit7e968351aa7abb766f56640f7dd9460749ef6f2b (patch)
tree24d179c88d79c08cb94c57cca50cdfaa7579c1a3 /library/core/src/alloc/layout.rs
parentb3affd3e90d44833ca43e8d14c0af54bcd862283 (diff)
parent65d7c1d2d621c607174f429d5f7553210315dbae (diff)
Merge from rustc
Diffstat (limited to 'library/core/src/alloc/layout.rs')
-rw-r--r--library/core/src/alloc/layout.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/library/core/src/alloc/layout.rs b/library/core/src/alloc/layout.rs
index 2a02870e30b..0b92767c932 100644
--- a/library/core/src/alloc/layout.rs
+++ b/library/core/src/alloc/layout.rs
@@ -25,7 +25,9 @@ const fn size_align<T>() -> (usize, usize) {
 /// An instance of `Layout` describes a particular layout of memory.
 /// You build a `Layout` up as an input to give to an allocator.
 ///
-/// All layouts have an associated size and a power-of-two alignment.
+/// All layouts have an associated size and a power-of-two alignment. The size, when rounded up to
+/// the nearest multiple of `align`, does not overflow isize (i.e., the rounded value will always be
+/// less than or equal to `isize::MAX`).
 ///
 /// (Note that layouts are *not* required to have non-zero size,
 /// even though `GlobalAlloc` requires that all memory requests