Skip to content

Commit

Permalink
Rollup merge of rust-lang#88370 - Seppel3210:master, r=dtolnay
Browse files Browse the repository at this point in the history
Add missing `# Panics` section to `Vec` method

namely `Vec::extend_from_within`
  • Loading branch information
Manishearth authored Oct 4, 2021
2 parents bfdaab8 + ca88f10 commit 96245bc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion library/alloc/src/vec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2188,7 +2188,12 @@ impl<T: Clone, A: Allocator> Vec<T, A> {

/// Copies elements from `src` range to the end of the vector.
///
/// ## Examples
/// # Panics
///
/// Panics if the starting point is greater than the end point or if
/// the end point is greater than the length of the vector.
///
/// # Examples
///
/// ```
/// let mut vec = vec![0, 1, 2, 3, 4];
Expand Down

0 comments on commit 96245bc

Please sign in to comment.