about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorTyler Mandry <tmandry@gmail.com>2019-11-27 15:28:44 -0600
committerGitHub <noreply@github.com>2019-11-27 15:28:44 -0600
commita3a8ee0636aa2f586241f87f76074c4abc49a77e (patch)
tree0f99032d0095d88dddf83ca6799660c32a91c3c8 /src/liballoc
parent61b810511c380c03b5f1e1b7325eb6cbfef6c29f (diff)
parent73b467da8992617ba22c6a575b322ad1fd9aae31 (diff)
downloadrust-a3a8ee0636aa2f586241f87f76074c4abc49a77e.tar.gz
rust-a3a8ee0636aa2f586241f87f76074c4abc49a77e.zip
Rollup merge of #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
Diffstat (limited to 'src/liballoc')
-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.
     ///