@@ -106,8 +106,7 @@ pub trait Iterator {
106
106
/// again may or may not eventually start returning [`Some(Item)`] again at some
107
107
/// point.
108
108
///
109
- /// [`None`]: ../../std/option/enum.Option.html#variant.None
110
- /// [`Some(Item)`]: ../../std/option/enum.Option.html#variant.Some
109
+ /// [`Some(Item)`]: Some
111
110
///
112
111
/// # Examples
113
112
///
@@ -160,9 +159,7 @@ pub trait Iterator {
160
159
/// The default implementation returns `(0, `[`None`]`)` which is correct for any
161
160
/// iterator.
162
161
///
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
166
163
///
167
164
/// # Examples
168
165
///
@@ -214,8 +211,6 @@ pub trait Iterator {
214
211
/// called at least once even if the iterator does not have any elements.
215
212
///
216
213
/// [`next`]: #tymethod.next
217
- /// [`None`]: ../../std/option/enum.Option.html#variant.None
218
- /// [`Some`]: ../../std/option/enum.Option.html#variant.Some
219
214
///
220
215
/// # Overflow Behavior
221
216
///
@@ -229,7 +224,7 @@ pub trait Iterator {
229
224
/// This function might panic if the iterator has more than [`usize::MAX`]
230
225
/// elements.
231
226
///
232
- /// [`usize::MAX`]: ../../std/ usize/constant. MAX.html
227
+ /// [`usize::MAX`]: crate:: usize:: MAX
233
228
///
234
229
/// # Examples
235
230
///
@@ -263,8 +258,6 @@ pub trait Iterator {
263
258
/// doing so, it keeps track of the current element. After [`None`] is
264
259
/// returned, `last()` will then return the last element it saw.
265
260
///
266
- /// [`None`]: ../../std/option/enum.Option.html#variant.None
267
- ///
268
261
/// # Examples
269
262
///
270
263
/// Basic usage:
@@ -303,8 +296,6 @@ pub trait Iterator {
303
296
/// `nth()` will return [`None`] if `n` is greater than or equal to the length of the
304
297
/// iterator.
305
298
///
306
- /// [`None`]: ../../std/option/enum.Option.html#variant.None
307
- ///
308
299
/// # Examples
309
300
///
310
301
/// Basic usage:
@@ -537,9 +528,8 @@ pub trait Iterator {
537
528
/// assert_eq!((2, 'o'), zipper[2]);
538
529
/// ```
539
530
///
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
543
533
#[ inline]
544
534
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
545
535
fn zip < U > ( self , other : U ) -> Zip < Self , U :: IntoIter >
@@ -568,7 +558,7 @@ pub trait Iterator {
568
558
/// more idiomatic to use [`for`] than `map()`.
569
559
///
570
560
/// [`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
572
562
///
573
563
/// # Examples
574
564
///
@@ -777,9 +767,7 @@ pub trait Iterator {
777
767
/// assert_eq!(iter.next(), None);
778
768
/// ```
779
769
///
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
783
771
#[ inline]
784
772
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
785
773
fn filter_map < B , F > ( self , f : F ) -> FilterMap < Self , F >
@@ -812,8 +800,8 @@ pub trait Iterator {
812
800
/// The returned iterator might panic if the to-be-returned index would
813
801
/// overflow a [`usize`].
814
802
///
815
- /// [`usize::MAX `]: ../../std/ usize/constant.MAX.html
816
- /// [`usize`]: ../../std/primitive. usize.html
803
+ /// [`usize`]: type@ usize
804
+ /// [`usize::MAX `]: crate:: usize::MAX
817
805
/// [`zip`]: #method.zip
818
806
///
819
807
/// # Examples
@@ -849,8 +837,8 @@ pub trait Iterator {
849
837
/// anything other than fetching the next value) of the [`next`] method
850
838
/// will occur.
851
839
///
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
854
842
///
855
843
/// # Examples
856
844
///
@@ -1116,8 +1104,6 @@ pub trait Iterator {
1116
1104
/// It is also not specified what this iterator returns after the first` None` is returned.
1117
1105
/// If you need fused iterator, use [`fuse`].
1118
1106
///
1119
- /// [`Some`]: ../../std/option/enum.Option.html#variant.Some
1120
- /// [`None`]: ../../std/option/enum.Option.html#variant.None
1121
1107
/// [`fuse`]: #method.fuse
1122
1108
#[ inline]
1123
1109
#[ unstable( feature = "iter_map_while" , reason = "recently added" , issue = "68537" ) ]
@@ -1216,8 +1202,6 @@ pub trait Iterator {
1216
1202
/// iterator and the return value from the closure, an [`Option`], is
1217
1203
/// yielded by the iterator.
1218
1204
///
1219
- /// [`Option`]: ../../std/option/enum.Option.html
1220
- ///
1221
1205
/// # Examples
1222
1206
///
1223
1207
/// Basic usage:
@@ -1366,8 +1350,7 @@ pub trait Iterator {
1366
1350
/// [`Some(T)`] again. `fuse()` adapts an iterator, ensuring that after a
1367
1351
/// [`None`] is given, it will always return [`None`] forever.
1368
1352
///
1369
- /// [`None`]: ../../std/option/enum.Option.html#variant.None
1370
- /// [`Some(T)`]: ../../std/option/enum.Option.html#variant.Some
1353
+ /// [`Some(T)`]: Some
1371
1354
///
1372
1355
/// # Examples
1373
1356
///
@@ -1658,10 +1641,9 @@ pub trait Iterator {
1658
1641
/// assert_eq!(Ok(vec![1, 3]), result);
1659
1642
/// ```
1660
1643
///
1661
- /// [`iter`]: ../../std/iter/trait.Iterator.html #tymethod.next
1644
+ /// [`iter`]: #tymethod.next
1662
1645
/// [`String`]: ../../std/string/struct.String.html
1663
- /// [`char`]: ../../std/primitive.char.html
1664
- /// [`Result`]: ../../std/result/enum.Result.html
1646
+ /// [`char`]: type@char
1665
1647
#[ inline]
1666
1648
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1667
1649
#[ must_use = "if you really need to exhaust the iterator, consider `.for_each(drop)` instead" ]
@@ -2184,8 +2166,7 @@ pub trait Iterator {
2184
2166
/// argument is a double reference. You can see this effect in the
2185
2167
/// examples below, with `&&x`.
2186
2168
///
2187
- /// [`Some(element)`]: ../../std/option/enum.Option.html#variant.Some
2188
- /// [`None`]: ../../std/option/enum.Option.html#variant.None
2169
+ /// [`Some(element)`]: Some
2189
2170
///
2190
2171
/// # Examples
2191
2172
///
@@ -2331,9 +2312,8 @@ pub trait Iterator {
2331
2312
/// This function might panic if the iterator has more than `usize::MAX`
2332
2313
/// non-matching elements.
2333
2314
///
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
2337
2317
///
2338
2318
/// # Examples
2339
2319
///
@@ -2394,8 +2374,7 @@ pub trait Iterator {
2394
2374
/// `rposition()` is short-circuiting; in other words, it will stop
2395
2375
/// processing as soon as it finds a `true`.
2396
2376
///
2397
- /// [`Some(index)`]: ../../std/option/enum.Option.html#variant.Some
2398
- /// [`None`]: ../../std/option/enum.Option.html#variant.None
2377
+ /// [`Some(index)`]: Some
2399
2378
///
2400
2379
/// # Examples
2401
2380
///
@@ -2449,8 +2428,6 @@ pub trait Iterator {
2449
2428
/// If several elements are equally maximum, the last element is
2450
2429
/// returned. If the iterator is empty, [`None`] is returned.
2451
2430
///
2452
- /// [`None`]: ../../std/option/enum.Option.html#variant.None
2453
- ///
2454
2431
/// # Examples
2455
2432
///
2456
2433
/// Basic usage:
@@ -2477,8 +2454,6 @@ pub trait Iterator {
2477
2454
/// If several elements are equally minimum, the first element is
2478
2455
/// returned. If the iterator is empty, [`None`] is returned.
2479
2456
///
2480
- /// [`None`]: ../../std/option/enum.Option.html#variant.None
2481
- ///
2482
2457
/// # Examples
2483
2458
///
2484
2459
/// Basic usage:
@@ -2506,8 +2481,6 @@ pub trait Iterator {
2506
2481
/// If several elements are equally maximum, the last element is
2507
2482
/// returned. If the iterator is empty, [`None`] is returned.
2508
2483
///
2509
- /// [`None`]: ../../std/option/enum.Option.html#variant.None
2510
- ///
2511
2484
/// # Examples
2512
2485
///
2513
2486
/// ```
@@ -2541,8 +2514,6 @@ pub trait Iterator {
2541
2514
/// If several elements are equally maximum, the last element is
2542
2515
/// returned. If the iterator is empty, [`None`] is returned.
2543
2516
///
2544
- /// [`None`]: ../../std/option/enum.Option.html#variant.None
2545
- ///
2546
2517
/// # Examples
2547
2518
///
2548
2519
/// ```
@@ -2570,8 +2541,6 @@ pub trait Iterator {
2570
2541
/// If several elements are equally minimum, the first element is
2571
2542
/// returned. If the iterator is empty, [`None`] is returned.
2572
2543
///
2573
- /// [`None`]: ../../std/option/enum.Option.html#variant.None
2574
- ///
2575
2544
/// # Examples
2576
2545
///
2577
2546
/// ```
@@ -2605,8 +2574,6 @@ pub trait Iterator {
2605
2574
/// If several elements are equally minimum, the first element is
2606
2575
/// returned. If the iterator is empty, [`None`] is returned.
2607
2576
///
2608
- /// [`None`]: ../../std/option/enum.Option.html#variant.None
2609
- ///
2610
2577
/// # Examples
2611
2578
///
2612
2579
/// ```
@@ -2747,7 +2714,7 @@ pub trait Iterator {
2747
2714
/// This is useful when you have an iterator over `&T`, but you need an
2748
2715
/// iterator over `T`.
2749
2716
///
2750
- /// [`clone`]: ../../std/ clone/trait. Clone.html#tymethod. clone
2717
+ /// [`clone`]: crate:: clone:: Clone:: clone
2751
2718
///
2752
2719
/// # Examples
2753
2720
///
@@ -2779,8 +2746,6 @@ pub trait Iterator {
2779
2746
/// from the beginning. After iterating again, it will start at the
2780
2747
/// beginning again. And again. And again. Forever.
2781
2748
///
2782
- /// [`None`]: ../../std/option/enum.Option.html#variant.None
2783
- ///
2784
2749
/// # Examples
2785
2750
///
2786
2751
/// Basic usage:
@@ -3233,7 +3198,7 @@ pub trait Iterator {
3233
3198
/// assert!(![0.0, 1.0, f32::NAN].iter().is_sorted_by(|a, b| a.partial_cmp(b)));
3234
3199
/// ```
3235
3200
///
3236
- /// [`is_sorted`]: trait.Iterator.html #method.is_sorted
3201
+ /// [`is_sorted`]: #method.is_sorted
3237
3202
#[ unstable( feature = "is_sorted" , reason = "new API" , issue = "53485" ) ]
3238
3203
fn is_sorted_by < F > ( mut self , mut compare : F ) -> bool
3239
3204
where
@@ -3262,7 +3227,7 @@ pub trait Iterator {
3262
3227
/// the elements, as determined by `f`. Apart from that, it's equivalent to [`is_sorted`]; see
3263
3228
/// its documentation for more information.
3264
3229
///
3265
- /// [`is_sorted`]: trait.Iterator.html #method.is_sorted
3230
+ /// [`is_sorted`]: #method.is_sorted
3266
3231
///
3267
3232
/// # Examples
3268
3233
///
0 commit comments