]> git.lizzy.rs Git - rust.git/commitdiff
Stabilize iterator_try_fold in 1.27.0
authorJosh Stone <jistone@redhat.com>
Mon, 2 Apr 2018 23:40:53 +0000 (16:40 -0700)
committerJosh Stone <jistone@redhat.com>
Mon, 2 Apr 2018 23:40:53 +0000 (16:40 -0700)
src/libcore/iter/iterator.rs
src/libcore/iter/traits.rs
src/libcore/tests/lib.rs

index 31f77f92435d83ff72a9f04582bb6717f1c1bedd..a54e0e0065565a29e64fe6f69eb8e66b9b221ea4 100644 (file)
@@ -1446,7 +1446,6 @@ fn partition<B, F>(self, mut f: F) -> (B, B) where
     /// 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 @@ fn partition<B, F>(self, mut f: F) -> (B, B) where
     /// Short-circuiting:
     ///
     /// ```
-    /// #![feature(iterator_try_fold)]
     /// let a = [10, 20, 30, 100, 40, 50];
     /// let mut it = a.iter();
     ///
@@ -1472,7 +1470,7 @@ fn partition<B, F>(self, mut f: F) -> (B, B) where
     /// 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 @@ fn try_fold<B, F, R>(&mut self, init: B, mut f: F) -> R where
     /// # Examples
     ///
     /// ```
-    /// #![feature(iterator_try_fold)]
     /// use std::fs::rename;
     /// use std::io::{stdout, Write};
     /// use std::path::Path;
@@ -1512,7 +1509,7 @@ fn try_fold<B, F, R>(&mut self, init: B, mut f: F) -> R where
     /// 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=()>
     {
index ee278651c8d122f3406207b878d88ab6210f8d55..ddbb59989424f11502b5c4b0f17e8f29498c571c 100644 (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>
     {
index 8a34660d556bf9066f880c81f26a913560f0a949..16150cd82beb16d859a1aec764137ebf1a6194b0 100644 (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)]