From ca88f10e39d421cbbd876a5da8d1ce52f84df73d Mon Sep 17 00:00:00 2001 From: Sebastian Widua Date: Thu, 26 Aug 2021 23:23:17 +0200 Subject: [PATCH] Add missing # Panics section to `Vec` method namely `Vec::extend_from_within` --- library/alloc/src/vec/mod.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/library/alloc/src/vec/mod.rs b/library/alloc/src/vec/mod.rs index 87a0d371815..39ed03c4379 100644 --- a/library/alloc/src/vec/mod.rs +++ b/library/alloc/src/vec/mod.rs @@ -2164,7 +2164,12 @@ pub fn extend_from_slice(&mut self, other: &[T]) { /// 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];