about summary refs log tree commit diff
path: root/src/libstd/collections
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2015-03-13 15:28:35 -0700
committerBrian Anderson <banderson@mozilla.com>2015-03-23 14:40:26 -0700
commite9019101a82dd7f61dcdcd52bcc0123d5ed25d22 (patch)
tree6553b47da56745ce8cab9e17265bba143608aa97 /src/libstd/collections
parentdf290f127e923e0aacfe8223dd77f0fa222f0bc8 (diff)
downloadrust-e9019101a82dd7f61dcdcd52bcc0123d5ed25d22.tar.gz
rust-e9019101a82dd7f61dcdcd52bcc0123d5ed25d22.zip
Add #![feature] attributes to doctests
Diffstat (limited to 'src/libstd/collections')
-rw-r--r--src/libstd/collections/hash/map.rs3
-rw-r--r--src/libstd/collections/hash/set.rs10
-rw-r--r--src/libstd/collections/mod.rs2
3 files changed, 15 insertions, 0 deletions
diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs
index 9139e182ce4..a632306454e 100644
--- a/src/libstd/collections/hash/map.rs
+++ b/src/libstd/collections/hash/map.rs
@@ -538,6 +538,7 @@ impl<K, V, S> HashMap<K, V, S>
     /// # Examples
     ///
     /// ```
+    /// # #![feature(std_misc)]
     /// use std::collections::HashMap;
     /// use std::collections::hash_map::RandomState;
     ///
@@ -566,6 +567,7 @@ impl<K, V, S> HashMap<K, V, S>
     /// # Examples
     ///
     /// ```
+    /// # #![feature(std_misc)]
     /// use std::collections::HashMap;
     /// use std::collections::hash_map::RandomState;
     ///
@@ -981,6 +983,7 @@ impl<K, V, S> HashMap<K, V, S>
     /// # Examples
     ///
     /// ```
+    /// # #![feature(std_misc)]
     /// use std::collections::HashMap;
     ///
     /// let mut a = HashMap::new();
diff --git a/src/libstd/collections/hash/set.rs b/src/libstd/collections/hash/set.rs
index de3f080de82..3bc511f8a22 100644
--- a/src/libstd/collections/hash/set.rs
+++ b/src/libstd/collections/hash/set.rs
@@ -145,6 +145,7 @@ impl<T, S> HashSet<T, S>
     /// # Examples
     ///
     /// ```
+    /// # #![feature(std_misc)]
     /// use std::collections::HashSet;
     /// use std::collections::hash_map::RandomState;
     ///
@@ -169,6 +170,7 @@ impl<T, S> HashSet<T, S>
     /// # Examples
     ///
     /// ```
+    /// # #![feature(std_misc)]
     /// use std::collections::HashSet;
     /// use std::collections::hash_map::RandomState;
     ///
@@ -295,6 +297,7 @@ impl<T, S> HashSet<T, S>
     /// # Examples
     ///
     /// ```
+    /// # #![feature(core)]
     /// use std::collections::HashSet;
     /// let a: HashSet<_> = [1, 2, 3].iter().cloned().collect();
     /// let b: HashSet<_> = [4, 2, 3, 4].iter().cloned().collect();
@@ -325,6 +328,7 @@ impl<T, S> HashSet<T, S>
     /// # Examples
     ///
     /// ```
+    /// # #![feature(core)]
     /// use std::collections::HashSet;
     /// let a: HashSet<_> = [1, 2, 3].iter().cloned().collect();
     /// let b: HashSet<_> = [4, 2, 3, 4].iter().cloned().collect();
@@ -351,6 +355,7 @@ impl<T, S> HashSet<T, S>
     /// # Examples
     ///
     /// ```
+    /// # #![feature(core)]
     /// use std::collections::HashSet;
     /// let a: HashSet<_> = [1, 2, 3].iter().cloned().collect();
     /// let b: HashSet<_> = [4, 2, 3, 4].iter().cloned().collect();
@@ -376,6 +381,7 @@ impl<T, S> HashSet<T, S>
     /// # Examples
     ///
     /// ```
+    /// # #![feature(core)]
     /// use std::collections::HashSet;
     /// let a: HashSet<_> = [1, 2, 3].iter().cloned().collect();
     /// let b: HashSet<_> = [4, 2, 3, 4].iter().cloned().collect();
@@ -458,6 +464,7 @@ impl<T, S> HashSet<T, S>
     /// # Examples
     ///
     /// ```
+    /// # #![feature(core)]
     /// use std::collections::HashSet;
     ///
     /// let set: HashSet<_> = [1, 2, 3].iter().cloned().collect();
@@ -477,6 +484,7 @@ impl<T, S> HashSet<T, S>
     /// # Examples
     ///
     /// ```
+    /// # #![feature(core)]
     /// use std::collections::HashSet;
     ///
     /// let a: HashSet<_> = [1, 2, 3].iter().cloned().collect();
@@ -498,6 +506,7 @@ impl<T, S> HashSet<T, S>
     /// # Examples
     ///
     /// ```
+    /// # #![feature(core)]
     /// use std::collections::HashSet;
     ///
     /// let sup: HashSet<_> = [1, 2, 3].iter().cloned().collect();
@@ -519,6 +528,7 @@ impl<T, S> HashSet<T, S>
     /// # Examples
     ///
     /// ```
+    /// # #![feature(core)]
     /// use std::collections::HashSet;
     ///
     /// let sub: HashSet<_> = [1, 2].iter().cloned().collect();
diff --git a/src/libstd/collections/mod.rs b/src/libstd/collections/mod.rs
index caada8ae50f..8d24f6b1916 100644
--- a/src/libstd/collections/mod.rs
+++ b/src/libstd/collections/mod.rs
@@ -300,6 +300,7 @@
 //! #### Counting the number of times each character in a string occurs
 //!
 //! ```
+//! # #![feature(collections)]
 //! use std::collections::btree_map::{BTreeMap, Entry};
 //!
 //! let mut count = BTreeMap::new();
@@ -327,6 +328,7 @@
 //! #### Tracking the inebriation of customers at a bar
 //!
 //! ```
+//! # #![feature(collections)]
 //! use std::collections::btree_map::{BTreeMap, Entry};
 //!
 //! // A client of the bar. They have an id and a blood alcohol level.