about summary refs log tree commit diff
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2021-10-03 23:13:20 -0700
committerGitHub <noreply@github.com>2021-10-03 23:13:20 -0700
commit5e66ba799beaa6d5616e448d3b688e633d0eea62 (patch)
treef648a798972bc3b000b7d1f69c4570c56f11bdb0
parent70d82e0a6ebc5166ba6745743a0aceac5df1da7e (diff)
parentca88f10e39d421cbbd876a5da8d1ce52f84df73d (diff)
downloadrust-5e66ba799beaa6d5616e448d3b688e633d0eea62.tar.gz
rust-5e66ba799beaa6d5616e448d3b688e633d0eea62.zip
Rollup merge of #88370 - Seppel3210:master, r=dtolnay
Add missing `# Panics` section to `Vec` method

namely `Vec::extend_from_within`
-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 f3a30d09825..ec7490328b2 100644
--- a/library/alloc/src/vec/mod.rs
+++ b/library/alloc/src/vec/mod.rs
@@ -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];