Skip to content

Commit a3a8ee0

Browse files
authored
Rollup merge of rust-lang#66744 - chrisduerr:master, r=Dylan-DPC
Fix shrink_to panic documentation While the potential for panicking is already documented for the `Vec::shrink_to` method, it is not clearly labeled with the usual `# Panics` heading. r? @steveklabnik
2 parents 61b8105 + 73b467d commit a3a8ee0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/liballoc/vec.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -629,6 +629,8 @@ impl<T> Vec<T> {
629629
/// The capacity will remain at least as large as both the length
630630
/// and the supplied value.
631631
///
632+
/// # Panics
633+
///
632634
/// Panics if the current capacity is smaller than the supplied
633635
/// minimum capacity.
634636
///

0 commit comments

Comments
 (0)