Stabilize iterator_try_fold in 1.27.0

This commit is contained in:
Josh Stone 2018-04-02 16:40:53 -07:00
parent d8c4c83dad
commit 9db63bb033
3 changed files with 3 additions and 9 deletions

View file

@ -1446,7 +1446,6 @@ pub trait Iterator {
/// Basic usage:
///
/// ```
/// #![feature(iterator_try_fold)]
/// let a = [1, 2, 3];
///
/// // the checked sum of all of the elements of the array
@ -1458,7 +1457,6 @@ pub trait Iterator {
/// Short-circuiting:
///
/// ```
/// #![feature(iterator_try_fold)]
/// let a = [10, 20, 30, 100, 40, 50];
/// let mut it = a.iter();
///
@ -1472,7 +1470,7 @@ pub trait Iterator {
/// assert_eq!(it.next(), Some(&40));
/// ```
#[inline]
#[unstable(feature = "iterator_try_fold", issue = "45594")]
#[stable(feature = "iterator_try_fold", since = "1.27.0")]
fn try_fold<B, F, R>(&mut self, init: B, mut f: F) -> R where
Self: Sized, F: FnMut(B, Self::Item) -> R, R: Try<Ok=B>
{
@ -1495,7 +1493,6 @@ pub trait Iterator {
/// # Examples
///
/// ```
/// #![feature(iterator_try_fold)]
/// use std::fs::rename;
/// use std::io::{stdout, Write};
/// use std::path::Path;
@ -1512,7 +1509,7 @@ pub trait Iterator {
/// assert_eq!(it.next(), Some("stale_bread.json"));
/// ```
#[inline]
#[unstable(feature = "iterator_try_fold", issue = "45594")]
#[stable(feature = "iterator_try_fold", since = "1.27.0")]
fn try_for_each<F, R>(&mut self, mut f: F) -> R where
Self: Sized, F: FnMut(Self::Item) -> R, R: Try<Ok=()>
{

View file

@ -427,7 +427,6 @@ pub trait DoubleEndedIterator: Iterator {
/// Basic usage:
///
/// ```
/// #![feature(iterator_try_fold)]
/// let a = ["1", "2", "3"];
/// let sum = a.iter()
/// .map(|&s| s.parse::<i32>())
@ -438,7 +437,6 @@ pub trait DoubleEndedIterator: Iterator {
/// Short-circuiting:
///
/// ```
/// #![feature(iterator_try_fold)]
/// let a = ["1", "rust", "3"];
/// let mut it = a.iter();
/// let sum = it
@ -452,7 +450,7 @@ pub trait DoubleEndedIterator: Iterator {
/// assert_eq!(it.next_back(), Some(&"1"));
/// ```
#[inline]
#[unstable(feature = "iterator_try_fold", issue = "45594")]
#[stable(feature = "iterator_try_fold", since = "1.27.0")]
fn try_rfold<B, F, R>(&mut self, init: B, mut f: F) -> R where
Self: Sized, F: FnMut(B, Self::Item) -> R, R: Try<Ok=B>
{

View file

@ -25,7 +25,6 @@
#![feature(iterator_step_by)]
#![cfg_attr(stage0, feature(i128_type))]
#![cfg_attr(stage0, feature(inclusive_range_syntax))]
#![feature(iterator_try_fold)]
#![feature(iterator_flatten)]
#![cfg_attr(stage0, feature(conservative_impl_trait))]
#![feature(iterator_repeat_with)]