diff options
| author | Josh Stone <jistone@redhat.com> | 2018-04-02 16:40:53 -0700 |
|---|---|---|
| committer | Josh Stone <jistone@redhat.com> | 2018-04-02 16:40:53 -0700 |
| commit | 9db63bb033271c7b9c9f4315eb6db3314758a33e (patch) | |
| tree | 020638d384914ae48e2d6c6eeb1bf51ca9a68f88 /src/libcore | |
| parent | d8c4c83dadb3a8d539bf0f4ad8260bc87420ca37 (diff) | |
| download | rust-9db63bb033271c7b9c9f4315eb6db3314758a33e.tar.gz rust-9db63bb033271c7b9c9f4315eb6db3314758a33e.zip | |
Stabilize iterator_try_fold in 1.27.0
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/iter/iterator.rs | 7 | ||||
| -rw-r--r-- | src/libcore/iter/traits.rs | 4 | ||||
| -rw-r--r-- | src/libcore/tests/lib.rs | 1 |
3 files changed, 3 insertions, 9 deletions
diff --git a/src/libcore/iter/iterator.rs b/src/libcore/iter/iterator.rs index 31f77f92435..a54e0e00655 100644 --- a/src/libcore/iter/iterator.rs +++ b/src/libcore/iter/iterator.rs @@ -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=()> { diff --git a/src/libcore/iter/traits.rs b/src/libcore/iter/traits.rs index ee278651c8d..ddbb5998942 100644 --- a/src/libcore/iter/traits.rs +++ b/src/libcore/iter/traits.rs @@ -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> { diff --git a/src/libcore/tests/lib.rs b/src/libcore/tests/lib.rs index 8a34660d556..16150cd82be 100644 --- a/src/libcore/tests/lib.rs +++ b/src/libcore/tests/lib.rs @@ -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)] |
