Skip to content

Commit ca88f10

Browse files
committed
Add missing # Panics section to Vec method
namely `Vec::extend_from_within`
1 parent 20997f6 commit ca88f10

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

library/alloc/src/vec/mod.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -2164,7 +2164,12 @@ impl<T: Clone, A: Allocator> Vec<T, A> {
21642164

21652165
/// Copies elements from `src` range to the end of the vector.
21662166
///
2167-
/// ## Examples
2167+
/// # Panics
2168+
///
2169+
/// Panics if the starting point is greater than the end point or if
2170+
/// the end point is greater than the length of the vector.
2171+
///
2172+
/// # Examples
21682173
///
21692174
/// ```
21702175
/// let mut vec = vec![0, 1, 2, 3, 4];

0 commit comments

Comments
 (0)