diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2021-10-03 23:13:20 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-03 23:13:20 -0700 |
| commit | 5e66ba799beaa6d5616e448d3b688e633d0eea62 (patch) | |
| tree | f648a798972bc3b000b7d1f69c4570c56f11bdb0 | |
| parent | 70d82e0a6ebc5166ba6745743a0aceac5df1da7e (diff) | |
| parent | ca88f10e39d421cbbd876a5da8d1ce52f84df73d (diff) | |
| download | rust-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.rs | 7 |
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]; |
