Skip to content

Commit

Permalink
Stablize Iterator::find_map
Browse files Browse the repository at this point in the history
  • Loading branch information
matklad committed Aug 15, 2018
1 parent 81cfaad commit 057878a
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 9 deletions.
5 changes: 1 addition & 4 deletions src/libcore/iter/iterator.rs
Expand Up @@ -1794,17 +1794,14 @@ pub trait Iterator {
/// # Examples
///
/// ```
/// #![feature(iterator_find_map)]
/// let a = ["lol", "NaN", "2", "5"];
///
/// let mut first_number = a.iter().find_map(|s| s.parse().ok());
///
/// assert_eq!(first_number, Some(2));
/// ```
#[inline]
#[unstable(feature = "iterator_find_map",
reason = "unstable new API",
issue = "49602")]
#[stable(feature = "iterator_find_map", since = "1.30.0")]
fn find_map<B, F>(&mut self, mut f: F) -> Option<B> where
Self: Sized,
F: FnMut(Self::Item) -> Option<B>,
Expand Down
1 change: 0 additions & 1 deletion src/libcore/tests/lib.rs
Expand Up @@ -37,7 +37,6 @@
#![feature(slice_align_to)]
#![feature(align_offset)]
#![feature(reverse_bits)]
#![feature(iterator_find_map)]
#![feature(inner_deref)]
#![feature(slice_internals)]
#![feature(option_replace)]
Expand Down
1 change: 0 additions & 1 deletion src/librustc/lib.rs
Expand Up @@ -45,7 +45,6 @@
#![feature(const_fn)]
#![feature(core_intrinsics)]
#![feature(drain_filter)]
#![feature(iterator_find_map)]
#![cfg_attr(windows, feature(libc))]
#![feature(macro_vis_matcher)]
#![feature(never_type)]
Expand Down
1 change: 0 additions & 1 deletion src/librustc_traits/lib.rs
Expand Up @@ -14,7 +14,6 @@
#![feature(crate_in_paths)]
#![feature(crate_visibility_modifier)]
#![feature(extern_prelude)]
#![feature(iterator_find_map)]
#![feature(in_band_lifetimes)]
#![cfg_attr(not(stage0), feature(nll))]

Expand Down
1 change: 0 additions & 1 deletion src/librustc_typeck/lib.rs
Expand Up @@ -75,7 +75,6 @@ This API is completely unstable and subject to change.
#![feature(box_syntax)]
#![feature(crate_visibility_modifier)]
#![feature(exhaustive_patterns)]
#![feature(iterator_find_map)]
#![cfg_attr(not(stage0), feature(nll))]
#![feature(quote)]
#![feature(refcell_replace_swap)]
Expand Down
1 change: 0 additions & 1 deletion src/librustdoc/lib.rs
Expand Up @@ -16,7 +16,6 @@
#![feature(rustc_private)]
#![feature(box_patterns)]
#![feature(box_syntax)]
#![feature(iterator_find_map)]
#![cfg_attr(not(stage0), feature(nll))]
#![feature(set_stdio)]
#![feature(slice_sort_by_cached_key)]
Expand Down

0 comments on commit 057878a

Please sign in to comment.