@@ -198,9 +198,9 @@ impl DefaultResizePolicy {
198198/// attacks such as HashDoS.
199199///
200200/// The hashing algorithm can be replaced on a per-`HashMap` basis using the
201- /// `HashMap::default`, `HashMap::with_hasher`, and
202- /// `HashMap::with_capacity_and_hasher` methods. Many alternative algorithms
203- /// are available on crates.io, such as the `fnv` crate.
201+ /// [ `HashMap::default`], [ `HashMap::with_hasher`] , and
202+ /// [ `HashMap::with_capacity_and_hasher`] methods. Many alternative algorithms
203+ /// are available on crates.io, such as the [ `fnv`] crate.
204204///
205205/// It is required that the keys implement the [`Eq`] and [`Hash`] traits, although
206206/// this can frequently be achieved by using `#[derive(PartialEq, Eq, Hash)]`.
@@ -302,6 +302,10 @@ impl DefaultResizePolicy {
302302/// [`PartialEq`]: ../../std/cmp/trait.PartialEq.html
303303/// [`RefCell`]: ../../std/cell/struct.RefCell.html
304304/// [`Cell`]: ../../std/cell/struct.Cell.html
305+ /// [`HashMap::default`]: #method.default
306+ /// [`HashMap::with_hasher`]: #method.with_hasher
307+ /// [`HashMap::with_capacity_and_hasher`]: #method.with_capacity_and_hasher
308+ /// [`fnv`]: https://crates.io/crates/fnv
305309///
306310/// ```
307311/// use std::collections::HashMap;
@@ -680,7 +684,9 @@ impl<K, V, S> HashMap<K, V, S>
680684 ///
681685 /// # Panics
682686 ///
683- /// Panics if the new allocation size overflows `usize`.
687+ /// Panics if the new allocation size overflows [`usize`].
688+ ///
689+ /// [`usize`]: ../../std/primitive.usize.html
684690 ///
685691 /// # Examples
686692 ///
@@ -1141,13 +1147,14 @@ impl<K, V, S> HashMap<K, V, S>
11411147
11421148 /// Inserts a key-value pair into the map.
11431149 ///
1144- /// If the map did not have this key present, `None` is returned.
1150+ /// If the map did not have this key present, [ `None`] is returned.
11451151 ///
11461152 /// If the map did have this key present, the value is updated, and the old
11471153 /// value is returned. The key is not updated, though; this matters for
11481154 /// types that can be `==` without being identical. See the [module-level
11491155 /// documentation] for more.
11501156 ///
1157+ /// [`None`]: ../../std/option/enum.Option.html#variant.None
11511158 /// [module-level documentation]: index.html#insert-and-complex-keys
11521159 ///
11531160 /// # Examples
0 commit comments