]> git.lizzy.rs Git - rust.git/commitdiff
collections: Fix broken doc example
authorAlex Crichton <alex@alexcrichton.com>
Thu, 10 Mar 2016 00:20:32 +0000 (16:20 -0800)
committerAlex Crichton <alex@alexcrichton.com>
Thu, 10 Mar 2016 00:20:32 +0000 (16:20 -0800)
PR #32135 was accidentally merged without tests passing, and unfortunately one
of the tests added was broken, so this fixes that.

src/libcollections/btree/map.rs

index 47518d8b33dc1102b169f20529e4ffadfe7950c9..1967f83ab271acd44071510bf1b9e548d4b9c7ec 100644 (file)
@@ -355,7 +355,7 @@ impl<K: Ord, V> BTreeMap<K, V> {
     /// let mut map = BTreeMap::new();
     ///
     /// // entries can now be inserted into the empty map
-    /// a.insert(1, "a");
+    /// map.insert(1, "a");
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn new() -> BTreeMap<K, V> {