diff --git a/src/doc/unstable-book/src/library-features/iterator-for-each.md b/src/doc/unstable-book/src/library-features/iterator-for-each.md deleted file mode 100644 index ebeb5f6a1de51..0000000000000 --- a/src/doc/unstable-book/src/library-features/iterator-for-each.md +++ /dev/null @@ -1,17 +0,0 @@ -# `iterator_for_each` - -The tracking issue for this feature is: [#42986] - -[#42986]: https://github.com/rust-lang/rust/issues/42986 - ------------------------- - -To call a closure on each element of an iterator, you can use `for_each`: - -```rust -#![feature(iterator_for_each)] - -fn main() { - (0..10).for_each(|i| println!("{}", i)); -} -``` diff --git a/src/libcore/iter/iterator.rs b/src/libcore/iter/iterator.rs index 7c009114afefb..edafd0ce2c227 100644 --- a/src/libcore/iter/iterator.rs +++ b/src/libcore/iter/iterator.rs @@ -498,8 +498,6 @@ pub trait Iterator { /// Basic usage: /// /// ``` - /// #![feature(iterator_for_each)] - /// /// use std::sync::mpsc::channel; /// /// let (tx, rx) = channel(); @@ -514,15 +512,13 @@ pub trait Iterator { /// might be preferable to keep a functional style with longer iterators: /// /// ``` - /// #![feature(iterator_for_each)] - /// /// (0..5).flat_map(|x| x * 100 .. x * 110) /// .enumerate() /// .filter(|&(i, x)| (i + x) % 3 == 0) /// .for_each(|(i, x)| println!("{}:{}", i, x)); /// ``` #[inline] - #[unstable(feature = "iterator_for_each", issue = "42986")] + #[stable(feature = "iterator_for_each", since = "1.22.0")] fn for_each(self, mut f: F) where Self: Sized, F: FnMut(Self::Item), { diff --git a/src/tools/rls b/src/tools/rls index 52d48656f93ee..7221e38023c41 160000 --- a/src/tools/rls +++ b/src/tools/rls @@ -1 +1 @@ -Subproject commit 52d48656f93eeeb2c568e6c1048e64168e5b209f +Subproject commit 7221e38023c41ff2532ebbf54a7da296fd488b50