Skip to content

Commit

Permalink
Rollup merge of rust-lang#91686 - dalcde:patch-1, r=dtolnay
Browse files Browse the repository at this point in the history
Fix `Vec::reserve_exact` documentation

The documentation previously said the new capacity cannot overflow `usize`, but in fact it cannot exceed `isize::MAX`.
  • Loading branch information
matthiaskrgr authored Dec 10, 2021
2 parents 7208476 + 42f9104 commit 51fb3cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/alloc/src/vec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
///
Expand Down

0 comments on commit 51fb3cb

Please sign in to comment.