Skip to content

Commit

Permalink
Rollup merge of rust-lang#44567 - budziq:stabilize_iterator_for_each,…
Browse files Browse the repository at this point in the history
… r=alexcrichton

stabilized iterator_for_each (closes rust-lang#42986)

Also updated clippy and rls as these use the iterator_for_each

I've made my first PR's today so most likely I've done something wrong. Sorry about that!
  • Loading branch information
TimNN authored Sep 17, 2017
2 parents a5bc385 + b715290 commit a0920b8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 23 deletions.
17 changes: 0 additions & 17 deletions src/doc/unstable-book/src/library-features/iterator-for-each.md

This file was deleted.

6 changes: 1 addition & 5 deletions src/libcore/iter/iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -498,8 +498,6 @@ pub trait Iterator {
/// Basic usage:
///
/// ```
/// #![feature(iterator_for_each)]
///
/// use std::sync::mpsc::channel;
///
/// let (tx, rx) = channel();
Expand All @@ -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<F>(self, mut f: F) where
Self: Sized, F: FnMut(Self::Item),
{
Expand Down
2 changes: 1 addition & 1 deletion src/tools/rls
Submodule rls updated from 52d486 to 7221e3

0 comments on commit a0920b8

Please sign in to comment.