about summary refs log tree commit diff
path: root/src/libstd/collections
diff options
context:
space:
mode:
authorSteve Klabnik <steve@steveklabnik.com>2015-11-04 10:19:54 +0100
committerSteve Klabnik <steve@steveklabnik.com>2015-11-04 10:19:54 +0100
commite9989d526dd638fd03599d80d2e5658381f4ee68 (patch)
tree972f915ee820687a75f005d36bf624c427e175a1 /src/libstd/collections
parenta216e847272ddbd3033037b606eaf2d801c250b9 (diff)
downloadrust-e9989d526dd638fd03599d80d2e5658381f4ee68.tar.gz
rust-e9989d526dd638fd03599d80d2e5658381f4ee68.zip
Add note about HashMap::capacity's bounds
Fixes #24591
Diffstat (limited to 'src/libstd/collections')
-rw-r--r--src/libstd/collections/hash/map.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs
index 7c6add80337..965226f6355 100644
--- a/src/libstd/collections/hash/map.rs
+++ b/src/libstd/collections/hash/map.rs
@@ -601,6 +601,9 @@ impl<K, V, S> HashMap<K, V, S>
 
     /// Returns the number of elements the map can hold without reallocating.
     ///
+    /// This number is a lower bound; the `HashMap<K, V>` might be able to hold
+    /// more, but is guaranteed to be able to hold at least this many.
+    ///
     /// # Examples
     ///
     /// ```