]> git.proxmox.com Git - rustc.git/blobdiff - src/libcore/hash/mod.rs
New upstream version 1.12.0+dfsg1
[rustc.git] / src / libcore / hash / mod.rs
index 9e3f7a4a84a814b318a9833f18fb6352fca5b1e3..27fdbd383017f08ea3e38350b47e0a6b9c9a84aa 100644 (file)
@@ -234,6 +234,16 @@ pub trait BuildHasher {
     type Hasher: Hasher;
 
     /// Creates a new hasher.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use std::collections::hash_map::RandomState;
+    /// use std::hash::BuildHasher;
+    ///
+    /// let s = RandomState::new();
+    /// let new_s = s.build_hasher();
+    /// ```
     #[stable(since = "1.7.0", feature = "build_hasher")]
     fn build_hasher(&self) -> Self::Hasher;
 }