From 24e09401696e6b2689ae4c78d9a24504a17f1e3a Mon Sep 17 00:00:00 2001 From: Mara Bos Date: Mon, 7 Dec 2020 21:24:07 +0100 Subject: [PATCH] Stabilize feature(iterator_fold_self): Iterator::reduce --- compiler/rustc_ast/src/lib.rs | 1 - compiler/rustc_hir/src/lib.rs | 1 - library/core/src/iter/traits/iterator.rs | 4 +--- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/compiler/rustc_ast/src/lib.rs b/compiler/rustc_ast/src/lib.rs index 0f411eda49d..ddf52caed08 100644 --- a/compiler/rustc_ast/src/lib.rs +++ b/compiler/rustc_ast/src/lib.rs @@ -14,7 +14,6 @@ #![feature(const_fn_transmute)] #![feature(const_panic)] #![feature(crate_visibility_modifier)] -#![feature(iterator_fold_self)] #![feature(label_break_value)] #![feature(nll)] #![feature(or_patterns)] diff --git a/compiler/rustc_hir/src/lib.rs b/compiler/rustc_hir/src/lib.rs index efc516a662f..c69a9b063ae 100644 --- a/compiler/rustc_hir/src/lib.rs +++ b/compiler/rustc_hir/src/lib.rs @@ -6,7 +6,6 @@ #![feature(const_fn)] // For the unsizing cast on `&[]` #![feature(const_panic)] #![feature(in_band_lifetimes)] -#![feature(iterator_fold_self)] #![feature(once_cell)] #![feature(or_patterns)] #![recursion_limit = "256"] diff --git a/library/core/src/iter/traits/iterator.rs b/library/core/src/iter/traits/iterator.rs index 648895e12f1..6b42d456205 100644 --- a/library/core/src/iter/traits/iterator.rs +++ b/library/core/src/iter/traits/iterator.rs @@ -2143,8 +2143,6 @@ pub trait Iterator { /// Find the maximum value: /// /// ``` - /// #![feature(iterator_fold_self)] - /// /// fn find_max(iter: I) -> Option /// where I: Iterator, /// I::Item: Ord, @@ -2160,7 +2158,7 @@ pub trait Iterator { /// assert_eq!(find_max(b.iter()), None); /// ``` #[inline] - #[unstable(feature = "iterator_fold_self", issue = "68125")] + #[stable(feature = "iterator_fold_self", since = "1.51.0")] fn reduce(mut self, f: F) -> Option where Self: Sized,