about summary refs log tree commit diff
path: root/library/alloc/src/vec
diff options
context:
space:
mode:
authorSebastian Widua <seppel3210@gmail.com>2021-08-26 23:23:17 +0200
committerSebastian Widua <seppel3210@gmail.com>2021-08-26 23:23:17 +0200
commitca88f10e39d421cbbd876a5da8d1ce52f84df73d (patch)
tree54fe84a809f405c63bfe5f7833236d75a61c29e0 /library/alloc/src/vec
parent20997f6ad81721542e9ef97bb2f58190903a34d8 (diff)
downloadrust-ca88f10e39d421cbbd876a5da8d1ce52f84df73d.tar.gz
rust-ca88f10e39d421cbbd876a5da8d1ce52f84df73d.zip
Add missing # Panics section to `Vec` method
namely `Vec::extend_from_within`
Diffstat (limited to 'library/alloc/src/vec')
-rw-r--r--library/alloc/src/vec/mod.rs7
1 files changed, 6 insertions, 1 deletions
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 @@ 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];