From 48e812687e25955d62b1fb5e19f2f2ae4e728710 Mon Sep 17 00:00:00 2001 From: overlookmotel Date: Wed, 1 Mar 2023 23:36:41 +0000 Subject: [PATCH] Fix docs for `alloc::realloc` Fixes #108546 --- library/core/src/alloc/global.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library/core/src/alloc/global.rs b/library/core/src/alloc/global.rs index 18da70451f2..c582111701a 100644 --- a/library/core/src/alloc/global.rs +++ b/library/core/src/alloc/global.rs @@ -235,7 +235,8 @@ unsafe fn alloc_zeroed(&self, layout: Layout) -> *mut u8 { /// * `new_size` must be greater than zero. /// /// * `new_size`, when rounded up to the nearest multiple of `layout.align()`, - /// must not overflow (i.e., the rounded value must be less than `usize::MAX`). + /// must not overflow isize (i.e., the rounded value must be less than or + /// equal to `isize::MAX`). /// /// (Extension subtraits might provide more specific bounds on /// behavior, e.g., guarantee a sentinel address or a null pointer