diff --git a/library/alloc/src/vec/mod.rs b/library/alloc/src/vec/mod.rs index c157aba83c283..d222fcb445f58 100644 --- a/library/alloc/src/vec/mod.rs +++ b/library/alloc/src/vec/mod.rs @@ -1771,7 +1771,7 @@ impl Vec { /// /// # Panics /// - /// Panics if the number of elements in the vector overflows a `usize`. + /// Panics if the new capacity exceeds `isize::MAX` bytes. /// /// # Examples ///