Skip to content

Commit 1d36c6a

Browse files
authored
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`.
2 parents 4286ade + 42f9104 commit 1d36c6a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/alloc/src/vec/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,7 @@ impl<T, A: Allocator> Vec<T, A> {
822822
///
823823
/// # Panics
824824
///
825-
/// Panics if the new capacity overflows `usize`.
825+
/// Panics if the new capacity exceeds `isize::MAX` bytes.
826826
///
827827
/// # Examples
828828
///

0 commit comments

Comments
 (0)