diff options
| author | Sebastian Widua <seppel3210@gmail.com> | 2021-08-26 23:23:17 +0200 |
|---|---|---|
| committer | Sebastian Widua <seppel3210@gmail.com> | 2021-08-26 23:23:17 +0200 |
| commit | ca88f10e39d421cbbd876a5da8d1ce52f84df73d (patch) | |
| tree | 54fe84a809f405c63bfe5f7833236d75a61c29e0 /library/alloc/src/vec | |
| parent | 20997f6ad81721542e9ef97bb2f58190903a34d8 (diff) | |
| download | rust-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.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 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]; |
