Skip to content

Commit 821af2b

Browse files
authored
Rollup merge of rust-lang#120986 - tshepang:extraneous, r=cuviper
iterator.rs: remove "Basic usage" text Only one example is given (for each method)
2 parents ca63ba9 + 2f68e0a commit 821af2b

File tree

1 file changed

+0
-40
lines changed

1 file changed

+0
-40
lines changed

Diff for: core/src/iter/traits/iterator.rs

-40
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,6 @@ pub trait Iterator {
8989
///
9090
/// # Examples
9191
///
92-
/// Basic usage:
93-
///
9492
/// ```
9593
/// let a = [1, 2, 3];
9694
///
@@ -249,8 +247,6 @@ pub trait Iterator {
249247
///
250248
/// # Examples
251249
///
252-
/// Basic usage:
253-
///
254250
/// ```
255251
/// let a = [1, 2, 3];
256252
/// assert_eq!(a.iter().count(), 3);
@@ -280,8 +276,6 @@ pub trait Iterator {
280276
///
281277
/// # Examples
282278
///
283-
/// Basic usage:
284-
///
285279
/// ```
286280
/// let a = [1, 2, 3];
287281
/// assert_eq!(a.iter().last(), Some(&3));
@@ -324,8 +318,6 @@ pub trait Iterator {
324318
///
325319
/// # Examples
326320
///
327-
/// Basic usage:
328-
///
329321
/// ```
330322
/// #![feature(iter_advance_by)]
331323
///
@@ -432,8 +424,6 @@ pub trait Iterator {
432424
///
433425
/// # Examples
434426
///
435-
/// Basic usage:
436-
///
437427
/// ```
438428
/// let a = [0, 1, 2, 3, 4, 5];
439429
/// let mut iter = a.iter().step_by(2);
@@ -1342,8 +1332,6 @@ pub trait Iterator {
13421332
///
13431333
/// # Examples
13441334
///
1345-
/// Basic usage:
1346-
///
13471335
/// ```
13481336
/// let a = [1, 2, 3];
13491337
///
@@ -1434,8 +1422,6 @@ pub trait Iterator {
14341422
///
14351423
/// # Examples
14361424
///
1437-
/// Basic usage:
1438-
///
14391425
/// ```
14401426
/// let a = [1, 2, 3, 4];
14411427
///
@@ -1486,8 +1472,6 @@ pub trait Iterator {
14861472
///
14871473
/// # Examples
14881474
///
1489-
/// Basic usage:
1490-
///
14911475
/// ```
14921476
/// let words = ["alpha", "beta", "gamma"];
14931477
///
@@ -1765,8 +1749,6 @@ pub trait Iterator {
17651749
///
17661750
/// # Examples
17671751
///
1768-
/// Basic usage:
1769-
///
17701752
/// ```
17711753
/// // an iterator which alternates between Some and None
17721754
/// struct Alternate {
@@ -1911,8 +1893,6 @@ pub trait Iterator {
19111893
///
19121894
/// # Examples
19131895
///
1914-
/// Basic usage:
1915-
///
19161896
/// ```
19171897
/// let mut words = ["hello", "world", "of", "Rust"].into_iter();
19181898
///
@@ -2221,8 +2201,6 @@ pub trait Iterator {
22212201
///
22222202
/// # Examples
22232203
///
2224-
/// Basic usage:
2225-
///
22262204
/// ```
22272205
/// let a = [1, 2, 3];
22282206
///
@@ -3193,8 +3171,6 @@ pub trait Iterator {
31933171
///
31943172
/// # Examples
31953173
///
3196-
/// Basic usage:
3197-
///
31983174
/// ```
31993175
/// let a = [1, 2, 3];
32003176
/// let b: Vec<u32> = Vec::new();
@@ -3232,8 +3208,6 @@ pub trait Iterator {
32323208
///
32333209
/// # Examples
32343210
///
3235-
/// Basic usage:
3236-
///
32373211
/// ```
32383212
/// let a = [1, 2, 3];
32393213
/// let b: Vec<u32> = Vec::new();
@@ -3420,8 +3394,6 @@ pub trait Iterator {
34203394
///
34213395
/// # Examples
34223396
///
3423-
/// Basic usage:
3424-
///
34253397
/// ```
34263398
/// let a = [(1, 2), (3, 4), (5, 6)];
34273399
///
@@ -3458,8 +3430,6 @@ pub trait Iterator {
34583430
///
34593431
/// # Examples
34603432
///
3461-
/// Basic usage:
3462-
///
34633433
/// ```
34643434
/// let a = [1, 2, 3];
34653435
///
@@ -3538,8 +3508,6 @@ pub trait Iterator {
35383508
///
35393509
/// # Examples
35403510
///
3541-
/// Basic usage:
3542-
///
35433511
/// ```
35443512
/// let a = [1, 2, 3];
35453513
///
@@ -3624,8 +3592,6 @@ pub trait Iterator {
36243592
///
36253593
/// # Examples
36263594
///
3627-
/// Basic usage:
3628-
///
36293595
/// ```
36303596
/// let a = [1, 2, 3];
36313597
/// let sum: i32 = a.iter().sum();
@@ -3703,8 +3669,6 @@ pub trait Iterator {
37033669
///
37043670
/// # Examples
37053671
///
3706-
/// Basic usage:
3707-
///
37083672
/// ```
37093673
/// #![feature(iter_order_by)]
37103674
///
@@ -3790,8 +3754,6 @@ pub trait Iterator {
37903754
///
37913755
/// # Examples
37923756
///
3793-
/// Basic usage:
3794-
///
37953757
/// ```
37963758
/// #![feature(iter_order_by)]
37973759
///
@@ -3863,8 +3825,6 @@ pub trait Iterator {
38633825
///
38643826
/// # Examples
38653827
///
3866-
/// Basic usage:
3867-
///
38683828
/// ```
38693829
/// #![feature(iter_order_by)]
38703830
///

0 commit comments

Comments
 (0)