@@ -251,6 +251,9 @@ impl<K, V, S> HashMap<K, V, S> {
251251 /// cause many collisions and very poor performance. Setting it
252252 /// manually using this function can expose a DoS attack vector.
253253 ///
254+ /// The `hash_builder` passed should implement the [`BuildHasher`] trait for
255+ /// the HashMap to be useful, see its documentation for details.
256+ ///
254257 /// # Examples
255258 ///
256259 /// ```
@@ -261,6 +264,8 @@ impl<K, V, S> HashMap<K, V, S> {
261264 /// let mut map = HashMap::with_hasher(s);
262265 /// map.insert(1, 2);
263266 /// ```
267+ ///
268+ /// [`BuildHasher`]: ../../std/hash/trait.BuildHasher.html
264269 #[ inline]
265270 #[ stable( feature = "hashmap_build_hasher" , since = "1.7.0" ) ]
266271 pub fn with_hasher ( hash_builder : S ) -> HashMap < K , V , S > {
@@ -278,6 +283,9 @@ impl<K, V, S> HashMap<K, V, S> {
278283 /// cause many collisions and very poor performance. Setting it
279284 /// manually using this function can expose a DoS attack vector.
280285 ///
286+ /// The `hash_builder` passed should implement the [`BuildHasher`] trait for
287+ /// the HashMap to be useful, see its documentation for details.
288+ ///
281289 /// # Examples
282290 ///
283291 /// ```
@@ -288,6 +296,8 @@ impl<K, V, S> HashMap<K, V, S> {
288296 /// let mut map = HashMap::with_capacity_and_hasher(10, s);
289297 /// map.insert(1, 2);
290298 /// ```
299+ ///
300+ /// [`BuildHasher`]: ../../std/hash/trait.BuildHasher.html
291301 #[ inline]
292302 #[ stable( feature = "hashmap_build_hasher" , since = "1.7.0" ) ]
293303 pub fn with_capacity_and_hasher ( capacity : usize , hash_builder : S ) -> HashMap < K , V , S > {
0 commit comments