Rollup merge of #88370 - Seppel3210:master, r=dtolnay

Add missing `# Panics` section to `Vec` method

namely `Vec::extend_from_within`
This commit is contained in:
Manish Goregaokar 2021-10-03 23:13:20 -07:00 committed by GitHub
commit 5e66ba799b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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];