Skip to content

Commit 51fb3cb

Browse files
authored
Rollup merge of rust-lang#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 7208476 + 42f9104 commit 51fb3cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/alloc/src/vec/mod.rs

Lines changed: 1 addition & 1 deletion
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)