Skip to content

Commit

Permalink
Rollup merge of rust-lang#95214 - tbu-:pr_vec_append_doc, r=Mark-Simu…
Browse files Browse the repository at this point in the history
…lacrum

Remove impossible panic note from `Vec::append`

Neither the number of elements in a vector can overflow a `usize`, nor
can the amount of elements in two vectors.
  • Loading branch information
matthiaskrgr committed May 27, 2022
2 parents ebbcbfc + 4123d33 commit 4254f92
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 @@ -1771,7 +1771,7 @@ impl<T, A: Allocator> Vec<T, A> {
///
/// # Panics
///
/// Panics if the number of elements in the vector overflows a `usize`.
/// Panics if the new capacity exceeds `isize::MAX` bytes.
///
/// # Examples
///
Expand Down

0 comments on commit 4254f92

Please sign in to comment.