about summary refs log tree commit diff
path: root/library/alloc/src/vec
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2021-12-10 22:41:25 +0100
committerGitHub <noreply@github.com>2021-12-10 22:41:25 +0100
commit1d36c6ac2e169728ab2537a5b711360fbd1f8732 (patch)
tree316acc707de464b61ef82e4aa4e05100379bede8 /library/alloc/src/vec
parent4286ade8c94bf3d9dbbafdf2c6acd001b56d3dd5 (diff)
parent42f91047c82c07ab72b9a90bf996c81ef0700888 (diff)
downloadrust-1d36c6ac2e169728ab2537a5b711360fbd1f8732.tar.gz
rust-1d36c6ac2e169728ab2537a5b711360fbd1f8732.zip
Rollup merge of #91686 - dalcde:patch-1, r=dtolnay
Fix `Vec::reserve_exact` documentation

The documentation previously said the new capacity cannot overflow `usize`, but in fact it cannot exceed `isize::MAX`.
Diffstat (limited to 'library/alloc/src/vec')
-rw-r--r--library/alloc/src/vec/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/alloc/src/vec/mod.rs b/library/alloc/src/vec/mod.rs
index f1b70fa2802..f65764770b1 100644
--- a/library/alloc/src/vec/mod.rs
+++ b/library/alloc/src/vec/mod.rs
@@ -822,7 +822,7 @@ impl<T, A: Allocator> Vec<T, A> {
     ///
     /// # Panics
     ///
-    /// Panics if the new capacity overflows `usize`.
+    /// Panics if the new capacity exceeds `isize::MAX` bytes.
     ///
     /// # Examples
     ///