about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2020-06-23 13:10:01 -0700
committerGitHub <noreply@github.com>2020-06-23 13:10:01 -0700
commit317a15142e842656f913d7debd2bc18a367948e4 (patch)
tree86a79035f4e7ec3c7064f2b0d7a6004a876af93d /src/liballoc
parent7d2fba1bd20dba01e0db55e4ee04a45ddf633547 (diff)
parent0c5c644c91edf6ed949cfa5ffc524f43369df604 (diff)
downloadrust-317a15142e842656f913d7debd2bc18a367948e4.tar.gz
rust-317a15142e842656f913d7debd2bc18a367948e4.zip
Rollup merge of #72876 - TrolledWoods:patch-2, r=Dylan-DPC
Mention that BTreeMap::new() doesn't allocate

I think it would be nice to mention this, so you don't have to dig through the src to look at the definition of new().
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/collections/btree/map.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/liballoc/collections/btree/map.rs b/src/liballoc/collections/btree/map.rs
index 2fcc8cc9873..350249f5db5 100644
--- a/src/liballoc/collections/btree/map.rs
+++ b/src/liballoc/collections/btree/map.rs
@@ -490,6 +490,8 @@ struct MergeIter<K, V, I: Iterator<Item = (K, V)>> {
 impl<K: Ord, V> BTreeMap<K, V> {
     /// Makes a new empty BTreeMap with a reasonable choice for B.
     ///
+    /// Does not allocate anything on its own.
+    ///
     /// # Examples
     ///
     /// Basic usage: