stabilized iterator_for_each (closes #42986) · rust-lang/rust@8772227 (original) (raw)
File tree
4 files changed
lines changed
- doc/unstable-book/src/library-features
4 files changed
lines changed
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -498,8 +498,6 @@ pub trait Iterator { | ||
| 498 | 498 | /// Basic usage: |
| 499 | 499 | /// |
| 500 | 500 | /// ``` |
| 501 | - /// #![feature(iterator_for_each)] | |
| 502 | - /// | |
| 503 | 501 | /// use std::sync::mpsc::channel; |
| 504 | 502 | /// |
| 505 | 503 | /// let (tx, rx) = channel(); |
| @@ -514,15 +512,13 @@ pub trait Iterator { | ||
| 514 | 512 | /// might be preferable to keep a functional style with longer iterators: |
| 515 | 513 | /// |
| 516 | 514 | /// ``` |
| 517 | - /// #![feature(iterator_for_each)] | |
| 518 | - /// | |
| 519 | 515 | /// (0..5).flat_map(|x |
| 520 | 516 | /// .enumerate() |
| 521 | 517 | /// .filter(|&(i, x) |
| 522 | 518 | /// .for_each(|(i, x) |
| 523 | 519 | /// ``` |
| 524 | 520 | #[inline] |
| 525 | -#[unstable(feature = "iterator_for_each", issue = "42986")] | |
| 521 | +#[stable(feature = "iterator_for_each", since = "1.22.0")] | |
| 526 | 522 | fn for_each<F>(self, mut f: F) where |
| 527 | 523 | Self: Sized, F: FnMut(Self::Item), |
| 528 | 524 | { |