@@ -98,12 +98,8 @@ use super::map::{self, HashMap, Keys, RandomState};
9898/// // use the values stored in the set
9999/// ```
100100///
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
107103#[ derive( Clone ) ]
108104#[ cfg_attr( not( test) , rustc_diagnostic_item = "hashset_type" ) ]
109105#[ stable( feature = "rust1" , since = "1.0.0" ) ]
@@ -286,8 +282,6 @@ impl<T, S> HashSet<T, S> {
286282 /// let mut set = HashSet::with_hasher(s);
287283 /// set.insert(2);
288284 /// ```
289- ///
290- /// [`BuildHasher`]: ../../std/hash/trait.BuildHasher.html
291285 #[ inline]
292286 #[ stable( feature = "hashmap_build_hasher" , since = "1.7.0" ) ]
293287 pub fn with_hasher ( hasher : S ) -> HashSet < T , S > {
@@ -318,8 +312,6 @@ impl<T, S> HashSet<T, S> {
318312 /// let mut set = HashSet::with_capacity_and_hasher(10, s);
319313 /// set.insert(1);
320314 /// ```
321- ///
322- /// [`BuildHasher`]: ../../std/hash/trait.BuildHasher.html
323315 #[ inline]
324316 #[ stable( feature = "hashmap_build_hasher" , since = "1.7.0" ) ]
325317 pub fn with_capacity_and_hasher ( capacity : usize , hasher : S ) -> HashSet < T , S > {
@@ -328,8 +320,6 @@ impl<T, S> HashSet<T, S> {
328320
329321 /// Returns a reference to the set's [`BuildHasher`].
330322 ///
331- /// [`BuildHasher`]: ../../std/hash/trait.BuildHasher.html
332- ///
333323 /// # Examples
334324 ///
335325 /// ```
@@ -577,9 +567,6 @@ where
577567 /// assert_eq!(set.contains(&1), true);
578568 /// assert_eq!(set.contains(&4), false);
579569 /// ```
580- ///
581- /// [`Eq`]: ../../std/cmp/trait.Eq.html
582- /// [`Hash`]: ../../std/hash/trait.Hash.html
583570 #[ inline]
584571 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
585572 pub fn contains < Q : ?Sized > ( & self , value : & Q ) -> bool
@@ -605,9 +592,6 @@ where
605592 /// assert_eq!(set.get(&2), Some(&2));
606593 /// assert_eq!(set.get(&4), None);
607594 /// ```
608- ///
609- /// [`Eq`]: ../../std/cmp/trait.Eq.html
610- /// [`Hash`]: ../../std/hash/trait.Hash.html
611595 #[ inline]
612596 #[ stable( feature = "set_recovery" , since = "1.9.0" ) ]
613597 pub fn get < Q : ?Sized > ( & self , value : & Q ) -> Option < & T >
@@ -849,9 +833,6 @@ where
849833 /// assert_eq!(set.remove(&2), true);
850834 /// assert_eq!(set.remove(&2), false);
851835 /// ```
852- ///
853- /// [`Eq`]: ../../std/cmp/trait.Eq.html
854- /// [`Hash`]: ../../std/hash/trait.Hash.html
855836 #[ inline]
856837 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
857838 pub fn remove < Q : ?Sized > ( & mut self , value : & Q ) -> bool
@@ -877,9 +858,6 @@ where
877858 /// assert_eq!(set.take(&2), Some(2));
878859 /// assert_eq!(set.take(&2), None);
879860 /// ```
880- ///
881- /// [`Eq`]: ../../std/cmp/trait.Eq.html
882- /// [`Hash`]: ../../std/hash/trait.Hash.html
883861 #[ inline]
884862 #[ stable( feature = "set_recovery" , since = "1.9.0" ) ]
885863 pub fn take < Q : ?Sized > ( & mut self , value : & Q ) -> Option < T >
@@ -1153,8 +1131,7 @@ where
11531131/// This `struct` is created by the [`iter`] method on [`HashSet`].
11541132/// See its documentation for more.
11551133///
1156- /// [`HashSet`]: struct.HashSet.html
1157- /// [`iter`]: struct.HashSet.html#method.iter
1134+ /// [`iter`]: HashSet::iter
11581135#[ stable( feature = "rust1" , since = "1.0.0" ) ]
11591136pub struct Iter < ' a , K : ' a > {
11601137 iter : Keys < ' a , K , ( ) > ,
@@ -1165,8 +1142,7 @@ pub struct Iter<'a, K: 'a> {
11651142/// This `struct` is created by the [`into_iter`] method on [`HashSet`]
11661143/// (provided by the `IntoIterator` trait). See its documentation for more.
11671144///
1168- /// [`HashSet`]: struct.HashSet.html
1169- /// [`into_iter`]: struct.HashSet.html#method.into_iter
1145+ /// [`into_iter`]: IntoIterator::into_iter
11701146#[ stable( feature = "rust1" , since = "1.0.0" ) ]
11711147pub struct IntoIter < K > {
11721148 iter : map:: IntoIter < K , ( ) > ,
@@ -1177,8 +1153,7 @@ pub struct IntoIter<K> {
11771153/// This `struct` is created by the [`drain`] method on [`HashSet`].
11781154/// See its documentation for more.
11791155///
1180- /// [`HashSet`]: struct.HashSet.html
1181- /// [`drain`]: struct.HashSet.html#method.drain
1156+ /// [`drain`]: HashSet::drain
11821157#[ stable( feature = "rust1" , since = "1.0.0" ) ]
11831158pub struct Drain < ' a , K : ' a > {
11841159 iter : map:: Drain < ' a , K , ( ) > ,
@@ -1189,8 +1164,7 @@ pub struct Drain<'a, K: 'a> {
11891164/// This `struct` is created by the [`intersection`] method on [`HashSet`].
11901165/// See its documentation for more.
11911166///
1192- /// [`HashSet`]: struct.HashSet.html
1193- /// [`intersection`]: struct.HashSet.html#method.intersection
1167+ /// [`intersection`]: HashSet::intersection
11941168#[ stable( feature = "rust1" , since = "1.0.0" ) ]
11951169pub struct Intersection < ' a , T : ' a , S : ' a > {
11961170 // iterator of the first set
@@ -1204,8 +1178,7 @@ pub struct Intersection<'a, T: 'a, S: 'a> {
12041178/// This `struct` is created by the [`difference`] method on [`HashSet`].
12051179/// See its documentation for more.
12061180///
1207- /// [`HashSet`]: struct.HashSet.html
1208- /// [`difference`]: struct.HashSet.html#method.difference
1181+ /// [`difference`]: HashSet::difference
12091182#[ stable( feature = "rust1" , since = "1.0.0" ) ]
12101183pub struct Difference < ' a , T : ' a , S : ' a > {
12111184 // iterator of the first set
@@ -1219,8 +1192,7 @@ pub struct Difference<'a, T: 'a, S: 'a> {
12191192/// This `struct` is created by the [`symmetric_difference`] method on
12201193/// [`HashSet`]. See its documentation for more.
12211194///
1222- /// [`HashSet`]: struct.HashSet.html
1223- /// [`symmetric_difference`]: struct.HashSet.html#method.symmetric_difference
1195+ /// [`symmetric_difference`]: HashSet::symmetric_difference
12241196#[ stable( feature = "rust1" , since = "1.0.0" ) ]
12251197pub struct SymmetricDifference < ' a , T : ' a , S : ' a > {
12261198 iter : Chain < Difference < ' a , T , S > , Difference < ' a , T , S > > ,
@@ -1231,8 +1203,7 @@ pub struct SymmetricDifference<'a, T: 'a, S: 'a> {
12311203/// This `struct` is created by the [`union`] method on [`HashSet`].
12321204/// See its documentation for more.
12331205///
1234- /// [`HashSet`]: struct.HashSet.html
1235- /// [`union`]: struct.HashSet.html#method.union
1206+ /// [`union`]: HashSet::union
12361207#[ stable( feature = "rust1" , since = "1.0.0" ) ]
12371208pub struct Union < ' a , T : ' a , S : ' a > {
12381209 iter : Chain < Iter < ' a , T > , Difference < ' a , T , S > > ,
0 commit comments