about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristian Duerr <contact@christianduerr.com>2019-11-25 15:49:40 +0100
committerChristian Duerr <contact@christianduerr.com>2019-11-25 15:49:40 +0100
commit73b467da8992617ba22c6a575b322ad1fd9aae31 (patch)
tree16247ec14cc35f64f32916360640f3106961dc88
parent582a4eaee6b3674a34aeefaa5ecad0207bac9b4b (diff)
downloadrust-73b467da8992617ba22c6a575b322ad1fd9aae31.tar.gz
rust-73b467da8992617ba22c6a575b322ad1fd9aae31.zip
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.
-rw-r--r--src/liballoc/vec.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/liballoc/vec.rs b/src/liballoc/vec.rs
index 07e4358d644..da31ed178f4 100644
--- a/src/liballoc/vec.rs
+++ b/src/liballoc/vec.rs
@@ -629,6 +629,8 @@ impl<T> Vec<T> {
     /// The capacity will remain at least as large as both the length
     /// and the supplied value.
     ///
+    /// # Panics
+    ///
     /// Panics if the current capacity is smaller than the supplied
     /// minimum capacity.
     ///