Skip to content

Commit 1d06bb9

Browse files
authored
Rollup merge of #108630 - overlookmotel:realloc-docs-fix, r=Amanieu
Fix docs for `alloc::realloc` Fixes #108546. Corrects the docs for `alloc::realloc` to bring the safety constraints into line with `Layout::from_size_align_unchecked`'s constraints.
2 parents f91b634 + 48e8126 commit 1d06bb9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

library/core/src/alloc/global.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,8 @@ pub unsafe trait GlobalAlloc {
235235
/// * `new_size` must be greater than zero.
236236
///
237237
/// * `new_size`, when rounded up to the nearest multiple of `layout.align()`,
238-
/// must not overflow (i.e., the rounded value must be less than `usize::MAX`).
238+
/// must not overflow isize (i.e., the rounded value must be less than or
239+
/// equal to `isize::MAX`).
239240
///
240241
/// (Extension subtraits might provide more specific bounds on
241242
/// behavior, e.g., guarantee a sentinel address or a null pointer

0 commit comments

Comments
 (0)