@@ -106,8 +106,7 @@ pub trait Iterator {
106106 /// again may or may not eventually start returning [`Some(Item)`] again at some
107107 /// point.
108108 ///
109- /// [`None`]: ../../std/option/enum.Option.html#variant.None
110- /// [`Some(Item)`]: ../../std/option/enum.Option.html#variant.Some
109+ /// [`Some(Item)`]: Some
111110 ///
112111 /// # Examples
113112 ///
@@ -160,9 +159,7 @@ pub trait Iterator {
160159 /// The default implementation returns `(0, `[`None`]`)` which is correct for any
161160 /// iterator.
162161 ///
163- /// [`usize`]: ../../std/primitive.usize.html
164- /// [`Option`]: ../../std/option/enum.Option.html
165- /// [`None`]: ../../std/option/enum.Option.html#variant.None
162+ /// [`usize`]: type@usize
166163 ///
167164 /// # Examples
168165 ///
@@ -214,8 +211,6 @@ pub trait Iterator {
214211 /// called at least once even if the iterator does not have any elements.
215212 ///
216213 /// [`next`]: #tymethod.next
217- /// [`None`]: ../../std/option/enum.Option.html#variant.None
218- /// [`Some`]: ../../std/option/enum.Option.html#variant.Some
219214 ///
220215 /// # Overflow Behavior
221216 ///
@@ -229,7 +224,7 @@ pub trait Iterator {
229224 /// This function might panic if the iterator has more than [`usize::MAX`]
230225 /// elements.
231226 ///
232- /// [`usize::MAX`]: ../../std/ usize/constant. MAX.html
227+ /// [`usize::MAX`]: crate:: usize:: MAX
233228 ///
234229 /// # Examples
235230 ///
@@ -263,8 +258,6 @@ pub trait Iterator {
263258 /// doing so, it keeps track of the current element. After [`None`] is
264259 /// returned, `last()` will then return the last element it saw.
265260 ///
266- /// [`None`]: ../../std/option/enum.Option.html#variant.None
267- ///
268261 /// # Examples
269262 ///
270263 /// Basic usage:
@@ -303,8 +296,6 @@ pub trait Iterator {
303296 /// `nth()` will return [`None`] if `n` is greater than or equal to the length of the
304297 /// iterator.
305298 ///
306- /// [`None`]: ../../std/option/enum.Option.html#variant.None
307- ///
308299 /// # Examples
309300 ///
310301 /// Basic usage:
@@ -537,9 +528,8 @@ pub trait Iterator {
537528 /// assert_eq!((2, 'o'), zipper[2]);
538529 /// ```
539530 ///
540- /// [`enumerate`]: trait.Iterator.html#method.enumerate
541- /// [`next`]: ../../std/iter/trait.Iterator.html#tymethod.next
542- /// [`None`]: ../../std/option/enum.Option.html#variant.None
531+ /// [`enumerate`]: #method.enumerate
532+ /// [`next`]: #tymethod.next
543533 #[ inline]
544534 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
545535 fn zip < U > ( self , other : U ) -> Zip < Self , U :: IntoIter >
@@ -568,7 +558,7 @@ pub trait Iterator {
568558 /// more idiomatic to use [`for`] than `map()`.
569559 ///
570560 /// [`for`]: ../../book/ch03-05-control-flow.html#looping-through-a-collection-with-for
571- /// [`FnMut`]: ../../std/ ops/trait. FnMut.html
561+ /// [`FnMut`]: crate:: ops:: FnMut
572562 ///
573563 /// # Examples
574564 ///
@@ -777,9 +767,7 @@ pub trait Iterator {
777767 /// assert_eq!(iter.next(), None);
778768 /// ```
779769 ///
780- /// [`Option<T>`]: ../../std/option/enum.Option.html
781- /// [`Some`]: ../../std/option/enum.Option.html#variant.Some
782- /// [`None`]: ../../std/option/enum.Option.html#variant.None
770+ /// [`Option<T>`]: Option
783771 #[ inline]
784772 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
785773 fn filter_map < B , F > ( self , f : F ) -> FilterMap < Self , F >
@@ -812,8 +800,8 @@ pub trait Iterator {
812800 /// The returned iterator might panic if the to-be-returned index would
813801 /// overflow a [`usize`].
814802 ///
815- /// [`usize::MAX `]: ../../std/ usize/constant.MAX.html
816- /// [`usize`]: ../../std/primitive. usize.html
803+ /// [`usize`]: type@ usize
804+ /// [`usize::MAX `]: crate:: usize::MAX
817805 /// [`zip`]: #method.zip
818806 ///
819807 /// # Examples
@@ -849,8 +837,8 @@ pub trait Iterator {
849837 /// anything other than fetching the next value) of the [`next`] method
850838 /// will occur.
851839 ///
852- /// [`peek`]: struct. Peekable.html#method. peek
853- /// [`next`]: ../../std/iter/trait.Iterator.html #tymethod.next
840+ /// [`peek`]: crate::iter:: Peekable:: peek
841+ /// [`next`]: #tymethod.next
854842 ///
855843 /// # Examples
856844 ///
@@ -1116,8 +1104,6 @@ pub trait Iterator {
11161104 /// It is also not specified what this iterator returns after the first` None` is returned.
11171105 /// If you need fused iterator, use [`fuse`].
11181106 ///
1119- /// [`Some`]: ../../std/option/enum.Option.html#variant.Some
1120- /// [`None`]: ../../std/option/enum.Option.html#variant.None
11211107 /// [`fuse`]: #method.fuse
11221108 #[ inline]
11231109 #[ unstable( feature = "iter_map_while" , reason = "recently added" , issue = "68537" ) ]
@@ -1216,8 +1202,6 @@ pub trait Iterator {
12161202 /// iterator and the return value from the closure, an [`Option`], is
12171203 /// yielded by the iterator.
12181204 ///
1219- /// [`Option`]: ../../std/option/enum.Option.html
1220- ///
12211205 /// # Examples
12221206 ///
12231207 /// Basic usage:
@@ -1366,8 +1350,7 @@ pub trait Iterator {
13661350 /// [`Some(T)`] again. `fuse()` adapts an iterator, ensuring that after a
13671351 /// [`None`] is given, it will always return [`None`] forever.
13681352 ///
1369- /// [`None`]: ../../std/option/enum.Option.html#variant.None
1370- /// [`Some(T)`]: ../../std/option/enum.Option.html#variant.Some
1353+ /// [`Some(T)`]: Some
13711354 ///
13721355 /// # Examples
13731356 ///
@@ -1658,10 +1641,9 @@ pub trait Iterator {
16581641 /// assert_eq!(Ok(vec![1, 3]), result);
16591642 /// ```
16601643 ///
1661- /// [`iter`]: ../../std/iter/trait.Iterator.html #tymethod.next
1644+ /// [`iter`]: #tymethod.next
16621645 /// [`String`]: ../../std/string/struct.String.html
1663- /// [`char`]: ../../std/primitive.char.html
1664- /// [`Result`]: ../../std/result/enum.Result.html
1646+ /// [`char`]: type@char
16651647 #[ inline]
16661648 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
16671649 #[ must_use = "if you really need to exhaust the iterator, consider `.for_each(drop)` instead" ]
@@ -2184,8 +2166,7 @@ pub trait Iterator {
21842166 /// argument is a double reference. You can see this effect in the
21852167 /// examples below, with `&&x`.
21862168 ///
2187- /// [`Some(element)`]: ../../std/option/enum.Option.html#variant.Some
2188- /// [`None`]: ../../std/option/enum.Option.html#variant.None
2169+ /// [`Some(element)`]: Some
21892170 ///
21902171 /// # Examples
21912172 ///
@@ -2331,9 +2312,8 @@ pub trait Iterator {
23312312 /// This function might panic if the iterator has more than `usize::MAX`
23322313 /// non-matching elements.
23332314 ///
2334- /// [`Some(index)`]: ../../std/option/enum.Option.html#variant.Some
2335- /// [`None`]: ../../std/option/enum.Option.html#variant.None
2336- /// [`usize::MAX`]: ../../std/usize/constant.MAX.html
2315+ /// [`Some(index)`]: Some
2316+ /// [`usize::MAX`]: crate::usize::MAX
23372317 ///
23382318 /// # Examples
23392319 ///
@@ -2394,8 +2374,7 @@ pub trait Iterator {
23942374 /// `rposition()` is short-circuiting; in other words, it will stop
23952375 /// processing as soon as it finds a `true`.
23962376 ///
2397- /// [`Some(index)`]: ../../std/option/enum.Option.html#variant.Some
2398- /// [`None`]: ../../std/option/enum.Option.html#variant.None
2377+ /// [`Some(index)`]: Some
23992378 ///
24002379 /// # Examples
24012380 ///
@@ -2449,8 +2428,6 @@ pub trait Iterator {
24492428 /// If several elements are equally maximum, the last element is
24502429 /// returned. If the iterator is empty, [`None`] is returned.
24512430 ///
2452- /// [`None`]: ../../std/option/enum.Option.html#variant.None
2453- ///
24542431 /// # Examples
24552432 ///
24562433 /// Basic usage:
@@ -2477,8 +2454,6 @@ pub trait Iterator {
24772454 /// If several elements are equally minimum, the first element is
24782455 /// returned. If the iterator is empty, [`None`] is returned.
24792456 ///
2480- /// [`None`]: ../../std/option/enum.Option.html#variant.None
2481- ///
24822457 /// # Examples
24832458 ///
24842459 /// Basic usage:
@@ -2506,8 +2481,6 @@ pub trait Iterator {
25062481 /// If several elements are equally maximum, the last element is
25072482 /// returned. If the iterator is empty, [`None`] is returned.
25082483 ///
2509- /// [`None`]: ../../std/option/enum.Option.html#variant.None
2510- ///
25112484 /// # Examples
25122485 ///
25132486 /// ```
@@ -2541,8 +2514,6 @@ pub trait Iterator {
25412514 /// If several elements are equally maximum, the last element is
25422515 /// returned. If the iterator is empty, [`None`] is returned.
25432516 ///
2544- /// [`None`]: ../../std/option/enum.Option.html#variant.None
2545- ///
25462517 /// # Examples
25472518 ///
25482519 /// ```
@@ -2570,8 +2541,6 @@ pub trait Iterator {
25702541 /// If several elements are equally minimum, the first element is
25712542 /// returned. If the iterator is empty, [`None`] is returned.
25722543 ///
2573- /// [`None`]: ../../std/option/enum.Option.html#variant.None
2574- ///
25752544 /// # Examples
25762545 ///
25772546 /// ```
@@ -2605,8 +2574,6 @@ pub trait Iterator {
26052574 /// If several elements are equally minimum, the first element is
26062575 /// returned. If the iterator is empty, [`None`] is returned.
26072576 ///
2608- /// [`None`]: ../../std/option/enum.Option.html#variant.None
2609- ///
26102577 /// # Examples
26112578 ///
26122579 /// ```
@@ -2747,7 +2714,7 @@ pub trait Iterator {
27472714 /// This is useful when you have an iterator over `&T`, but you need an
27482715 /// iterator over `T`.
27492716 ///
2750- /// [`clone`]: ../../std/ clone/trait. Clone.html#tymethod. clone
2717+ /// [`clone`]: crate:: clone:: Clone:: clone
27512718 ///
27522719 /// # Examples
27532720 ///
@@ -2779,8 +2746,6 @@ pub trait Iterator {
27792746 /// from the beginning. After iterating again, it will start at the
27802747 /// beginning again. And again. And again. Forever.
27812748 ///
2782- /// [`None`]: ../../std/option/enum.Option.html#variant.None
2783- ///
27842749 /// # Examples
27852750 ///
27862751 /// Basic usage:
@@ -3233,7 +3198,7 @@ pub trait Iterator {
32333198 /// assert!(![0.0, 1.0, f32::NAN].iter().is_sorted_by(|a, b| a.partial_cmp(b)));
32343199 /// ```
32353200 ///
3236- /// [`is_sorted`]: trait.Iterator.html #method.is_sorted
3201+ /// [`is_sorted`]: #method.is_sorted
32373202 #[ unstable( feature = "is_sorted" , reason = "new API" , issue = "53485" ) ]
32383203 fn is_sorted_by < F > ( mut self , mut compare : F ) -> bool
32393204 where
@@ -3262,7 +3227,7 @@ pub trait Iterator {
32623227 /// the elements, as determined by `f`. Apart from that, it's equivalent to [`is_sorted`]; see
32633228 /// its documentation for more information.
32643229 ///
3265- /// [`is_sorted`]: trait.Iterator.html #method.is_sorted
3230+ /// [`is_sorted`]: #method.is_sorted
32663231 ///
32673232 /// # Examples
32683233 ///
0 commit comments