Skip to content

Commit 9f69a23

Browse files
authored
Rollup merge of #76338 - euclio:intra-link-iterator, r=jyn514
add some intra-doc links to `Iterator`
2 parents 1b24f14 + 2ed1a21 commit 9f69a23

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

library/core/src/iter/traits/iterator.rs

+13-13
Original file line numberDiff line numberDiff line change
@@ -809,7 +809,7 @@ pub trait Iterator {
809809
Enumerate::new(self)
810810
}
811811

812-
/// Creates an iterator which can use `peek` to look at the next element of
812+
/// Creates an iterator which can use [`peek`] to look at the next element of
813813
/// the iterator without consuming it.
814814
///
815815
/// Adds a [`peek`] method to an iterator. See its documentation for
@@ -1992,7 +1992,7 @@ pub trait Iterator {
19921992

19931993
/// The same as [`fold()`], but uses the first element in the
19941994
/// iterator as the initial value, folding every subsequent element into it.
1995-
/// If the iterator is empty, return `None`; otherwise, return the result
1995+
/// If the iterator is empty, return [`None`]; otherwise, return the result
19961996
/// of the fold.
19971997
///
19981998
/// [`fold()`]: Iterator::fold
@@ -2821,7 +2821,7 @@ pub trait Iterator {
28212821
Product::product(self)
28222822
}
28232823

2824-
/// Lexicographically compares the elements of this `Iterator` with those
2824+
/// Lexicographically compares the elements of this [`Iterator`] with those
28252825
/// of another.
28262826
///
28272827
/// # Examples
@@ -2843,7 +2843,7 @@ pub trait Iterator {
28432843
self.cmp_by(other, |x, y| x.cmp(&y))
28442844
}
28452845

2846-
/// Lexicographically compares the elements of this `Iterator` with those
2846+
/// Lexicographically compares the elements of this [`Iterator`] with those
28472847
/// of another with respect to the specified comparison function.
28482848
///
28492849
/// # Examples
@@ -2895,7 +2895,7 @@ pub trait Iterator {
28952895
}
28962896
}
28972897

2898-
/// Lexicographically compares the elements of this `Iterator` with those
2898+
/// Lexicographically compares the elements of this [`Iterator`] with those
28992899
/// of another.
29002900
///
29012901
/// # Examples
@@ -2919,7 +2919,7 @@ pub trait Iterator {
29192919
self.partial_cmp_by(other, |x, y| x.partial_cmp(&y))
29202920
}
29212921

2922-
/// Lexicographically compares the elements of this `Iterator` with those
2922+
/// Lexicographically compares the elements of this [`Iterator`] with those
29232923
/// of another with respect to the specified comparison function.
29242924
///
29252925
/// # Examples
@@ -2980,7 +2980,7 @@ pub trait Iterator {
29802980
}
29812981
}
29822982

2983-
/// Determines if the elements of this `Iterator` are equal to those of
2983+
/// Determines if the elements of this [`Iterator`] are equal to those of
29842984
/// another.
29852985
///
29862986
/// # Examples
@@ -2999,7 +2999,7 @@ pub trait Iterator {
29992999
self.eq_by(other, |x, y| x == y)
30003000
}
30013001

3002-
/// Determines if the elements of this `Iterator` are equal to those of
3002+
/// Determines if the elements of this [`Iterator`] are equal to those of
30033003
/// another with respect to the specified equality function.
30043004
///
30053005
/// # Examples
@@ -3040,7 +3040,7 @@ pub trait Iterator {
30403040
}
30413041
}
30423042

3043-
/// Determines if the elements of this `Iterator` are unequal to those of
3043+
/// Determines if the elements of this [`Iterator`] are unequal to those of
30443044
/// another.
30453045
///
30463046
/// # Examples
@@ -3059,7 +3059,7 @@ pub trait Iterator {
30593059
!self.eq(other)
30603060
}
30613061

3062-
/// Determines if the elements of this `Iterator` are lexicographically
3062+
/// Determines if the elements of this [`Iterator`] are lexicographically
30633063
/// less than those of another.
30643064
///
30653065
/// # Examples
@@ -3080,7 +3080,7 @@ pub trait Iterator {
30803080
self.partial_cmp(other) == Some(Ordering::Less)
30813081
}
30823082

3083-
/// Determines if the elements of this `Iterator` are lexicographically
3083+
/// Determines if the elements of this [`Iterator`] are lexicographically
30843084
/// less or equal to those of another.
30853085
///
30863086
/// # Examples
@@ -3101,7 +3101,7 @@ pub trait Iterator {
31013101
matches!(self.partial_cmp(other), Some(Ordering::Less | Ordering::Equal))
31023102
}
31033103

3104-
/// Determines if the elements of this `Iterator` are lexicographically
3104+
/// Determines if the elements of this [`Iterator`] are lexicographically
31053105
/// greater than those of another.
31063106
///
31073107
/// # Examples
@@ -3122,7 +3122,7 @@ pub trait Iterator {
31223122
self.partial_cmp(other) == Some(Ordering::Greater)
31233123
}
31243124

3125-
/// Determines if the elements of this `Iterator` are lexicographically
3125+
/// Determines if the elements of this [`Iterator`] are lexicographically
31263126
/// greater than or equal to those of another.
31273127
///
31283128
/// # Examples

0 commit comments

Comments
 (0)