@@ -98,12 +98,8 @@ use super::map::{self, HashMap, Keys, RandomState};
98
98
/// // use the values stored in the set
99
99
/// ```
100
100
///
101
- /// [`Cell`]: ../../std/cell/struct.Cell.html
102
- /// [`Eq`]: ../../std/cmp/trait.Eq.html
103
- /// [`Hash`]: ../../std/hash/trait.Hash.html
104
- /// [`HashMap`]: struct.HashMap.html
105
- /// [`PartialEq`]: ../../std/cmp/trait.PartialEq.html
106
- /// [`RefCell`]: ../../std/cell/struct.RefCell.html
101
+ /// [`RefCell`]: crate::cell::RefCell
102
+ /// [`Cell`]: crate::cell::Cell
107
103
#[ derive( Clone ) ]
108
104
#[ cfg_attr( not( test) , rustc_diagnostic_item = "hashset_type" ) ]
109
105
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
@@ -286,8 +282,6 @@ impl<T, S> HashSet<T, S> {
286
282
/// let mut set = HashSet::with_hasher(s);
287
283
/// set.insert(2);
288
284
/// ```
289
- ///
290
- /// [`BuildHasher`]: ../../std/hash/trait.BuildHasher.html
291
285
#[ inline]
292
286
#[ stable( feature = "hashmap_build_hasher" , since = "1.7.0" ) ]
293
287
pub fn with_hasher ( hasher : S ) -> HashSet < T , S > {
@@ -318,8 +312,6 @@ impl<T, S> HashSet<T, S> {
318
312
/// let mut set = HashSet::with_capacity_and_hasher(10, s);
319
313
/// set.insert(1);
320
314
/// ```
321
- ///
322
- /// [`BuildHasher`]: ../../std/hash/trait.BuildHasher.html
323
315
#[ inline]
324
316
#[ stable( feature = "hashmap_build_hasher" , since = "1.7.0" ) ]
325
317
pub fn with_capacity_and_hasher ( capacity : usize , hasher : S ) -> HashSet < T , S > {
@@ -328,8 +320,6 @@ impl<T, S> HashSet<T, S> {
328
320
329
321
/// Returns a reference to the set's [`BuildHasher`].
330
322
///
331
- /// [`BuildHasher`]: ../../std/hash/trait.BuildHasher.html
332
- ///
333
323
/// # Examples
334
324
///
335
325
/// ```
@@ -577,9 +567,6 @@ where
577
567
/// assert_eq!(set.contains(&1), true);
578
568
/// assert_eq!(set.contains(&4), false);
579
569
/// ```
580
- ///
581
- /// [`Eq`]: ../../std/cmp/trait.Eq.html
582
- /// [`Hash`]: ../../std/hash/trait.Hash.html
583
570
#[ inline]
584
571
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
585
572
pub fn contains < Q : ?Sized > ( & self , value : & Q ) -> bool
@@ -605,9 +592,6 @@ where
605
592
/// assert_eq!(set.get(&2), Some(&2));
606
593
/// assert_eq!(set.get(&4), None);
607
594
/// ```
608
- ///
609
- /// [`Eq`]: ../../std/cmp/trait.Eq.html
610
- /// [`Hash`]: ../../std/hash/trait.Hash.html
611
595
#[ inline]
612
596
#[ stable( feature = "set_recovery" , since = "1.9.0" ) ]
613
597
pub fn get < Q : ?Sized > ( & self , value : & Q ) -> Option < & T >
@@ -849,9 +833,6 @@ where
849
833
/// assert_eq!(set.remove(&2), true);
850
834
/// assert_eq!(set.remove(&2), false);
851
835
/// ```
852
- ///
853
- /// [`Eq`]: ../../std/cmp/trait.Eq.html
854
- /// [`Hash`]: ../../std/hash/trait.Hash.html
855
836
#[ inline]
856
837
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
857
838
pub fn remove < Q : ?Sized > ( & mut self , value : & Q ) -> bool
@@ -877,9 +858,6 @@ where
877
858
/// assert_eq!(set.take(&2), Some(2));
878
859
/// assert_eq!(set.take(&2), None);
879
860
/// ```
880
- ///
881
- /// [`Eq`]: ../../std/cmp/trait.Eq.html
882
- /// [`Hash`]: ../../std/hash/trait.Hash.html
883
861
#[ inline]
884
862
#[ stable( feature = "set_recovery" , since = "1.9.0" ) ]
885
863
pub fn take < Q : ?Sized > ( & mut self , value : & Q ) -> Option < T >
@@ -1153,8 +1131,7 @@ where
1153
1131
/// This `struct` is created by the [`iter`] method on [`HashSet`].
1154
1132
/// See its documentation for more.
1155
1133
///
1156
- /// [`HashSet`]: struct.HashSet.html
1157
- /// [`iter`]: struct.HashSet.html#method.iter
1134
+ /// [`iter`]: HashSet::iter
1158
1135
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1159
1136
pub struct Iter < ' a , K : ' a > {
1160
1137
iter : Keys < ' a , K , ( ) > ,
@@ -1165,8 +1142,7 @@ pub struct Iter<'a, K: 'a> {
1165
1142
/// This `struct` is created by the [`into_iter`] method on [`HashSet`]
1166
1143
/// (provided by the `IntoIterator` trait). See its documentation for more.
1167
1144
///
1168
- /// [`HashSet`]: struct.HashSet.html
1169
- /// [`into_iter`]: struct.HashSet.html#method.into_iter
1145
+ /// [`into_iter`]: IntoIterator::into_iter
1170
1146
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1171
1147
pub struct IntoIter < K > {
1172
1148
iter : map:: IntoIter < K , ( ) > ,
@@ -1177,8 +1153,7 @@ pub struct IntoIter<K> {
1177
1153
/// This `struct` is created by the [`drain`] method on [`HashSet`].
1178
1154
/// See its documentation for more.
1179
1155
///
1180
- /// [`HashSet`]: struct.HashSet.html
1181
- /// [`drain`]: struct.HashSet.html#method.drain
1156
+ /// [`drain`]: HashSet::drain
1182
1157
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1183
1158
pub struct Drain < ' a , K : ' a > {
1184
1159
iter : map:: Drain < ' a , K , ( ) > ,
@@ -1189,8 +1164,7 @@ pub struct Drain<'a, K: 'a> {
1189
1164
/// This `struct` is created by the [`intersection`] method on [`HashSet`].
1190
1165
/// See its documentation for more.
1191
1166
///
1192
- /// [`HashSet`]: struct.HashSet.html
1193
- /// [`intersection`]: struct.HashSet.html#method.intersection
1167
+ /// [`intersection`]: HashSet::intersection
1194
1168
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1195
1169
pub struct Intersection < ' a , T : ' a , S : ' a > {
1196
1170
// iterator of the first set
@@ -1204,8 +1178,7 @@ pub struct Intersection<'a, T: 'a, S: 'a> {
1204
1178
/// This `struct` is created by the [`difference`] method on [`HashSet`].
1205
1179
/// See its documentation for more.
1206
1180
///
1207
- /// [`HashSet`]: struct.HashSet.html
1208
- /// [`difference`]: struct.HashSet.html#method.difference
1181
+ /// [`difference`]: HashSet::difference
1209
1182
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1210
1183
pub struct Difference < ' a , T : ' a , S : ' a > {
1211
1184
// iterator of the first set
@@ -1219,8 +1192,7 @@ pub struct Difference<'a, T: 'a, S: 'a> {
1219
1192
/// This `struct` is created by the [`symmetric_difference`] method on
1220
1193
/// [`HashSet`]. See its documentation for more.
1221
1194
///
1222
- /// [`HashSet`]: struct.HashSet.html
1223
- /// [`symmetric_difference`]: struct.HashSet.html#method.symmetric_difference
1195
+ /// [`symmetric_difference`]: HashSet::symmetric_difference
1224
1196
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1225
1197
pub struct SymmetricDifference < ' a , T : ' a , S : ' a > {
1226
1198
iter : Chain < Difference < ' a , T , S > , Difference < ' a , T , S > > ,
@@ -1231,8 +1203,7 @@ pub struct SymmetricDifference<'a, T: 'a, S: 'a> {
1231
1203
/// This `struct` is created by the [`union`] method on [`HashSet`].
1232
1204
/// See its documentation for more.
1233
1205
///
1234
- /// [`HashSet`]: struct.HashSet.html
1235
- /// [`union`]: struct.HashSet.html#method.union
1206
+ /// [`union`]: HashSet::union
1236
1207
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1237
1208
pub struct Union < ' a , T : ' a , S : ' a > {
1238
1209
iter : Chain < Iter < ' a , T > , Difference < ' a , T , S > > ,
0 commit comments