@@ -56,16 +56,16 @@ use self::Entry::*;
56
56
/// however, performance is excellent.
57
57
///
58
58
/// It is a logic error for a key to be modified in such a way that the key's ordering relative to
59
- /// any other key, as determined by the `Ord` trait, changes while it is in the map. This is
60
- /// normally only possible through `Cell`, `RefCell`, global state, I/O, or unsafe code.
59
+ /// any other key, as determined by the [ `Ord`] trait, changes while it is in the map. This is
60
+ /// normally only possible through [ `Cell`], [ `RefCell`] , global state, I/O, or unsafe code.
61
61
///
62
62
/// # Examples
63
63
///
64
64
/// ```
65
65
/// use std::collections::BTreeMap;
66
66
///
67
67
/// // type inference lets us omit an explicit type signature (which
68
- /// // would be `BTreeMap<&str, &str>` in this example).
68
+ /// // would be [ `BTreeMap<&str, &str>`] in this example).
69
69
/// let mut movie_reviews = BTreeMap::new();
70
70
///
71
71
/// // review some movies.
@@ -98,15 +98,15 @@ use self::Entry::*;
98
98
/// }
99
99
/// ```
100
100
///
101
- /// `BTreeMap` also implements an [`Entry API`](#method.entry), which allows
101
+ /// [ `BTreeMap`] also implements an [`Entry API`](#method.entry), which allows
102
102
/// for more complex methods of getting, setting, updating and removing keys and
103
103
/// their values:
104
104
///
105
105
/// ```
106
106
/// use std::collections::BTreeMap;
107
107
///
108
108
/// // type inference lets us omit an explicit type signature (which
109
- /// // would be `BTreeMap<&str, u8>` in this example).
109
+ /// // would be [ `BTreeMap<&str, u8>`] in this example).
110
110
/// let mut player_stats = BTreeMap::new();
111
111
///
112
112
/// fn random_stat_buff() -> u8 {
@@ -126,6 +126,13 @@ use self::Entry::*;
126
126
/// let stat = player_stats.entry("attack").or_insert(100);
127
127
/// *stat += random_stat_buff();
128
128
/// ```
129
+ ///
130
+ /// [`BTreeMap`]: /std/collections/struct.BTreeMap.html
131
+ /// [`BTreeMap<&str, &str>`]: /std/collections/struct.BTreeMap.html
132
+ /// [`BTreeMap<&str, u8>`]: /std/collections/struct.BTreeMap.html
133
+ /// [`Cell`]: /std/cell/struct.Cell.html
134
+ /// [`Ord`]: /std/cmp/trait.Ord.html
135
+ /// [`RefCell`]: /std/cell/struct.RefCell.html
129
136
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
130
137
pub struct BTreeMap < K , V > {
131
138
root : node:: Root < K , V > ,
0 commit comments