Skip to content

Commit d8c4c83

Browse files
committed
Stabilize iter_rfind in 1.27.0
1 parent 1c8d10b commit d8c4c83

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

src/libcore/iter/traits.rs

+2-6
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ pub trait DoubleEndedIterator: Iterator {
522522
self.try_rfold(accum, move |acc, x| AlwaysOk(f(acc, x))).0
523523
}
524524

525-
/// Searches for an element of an iterator from the right that satisfies a predicate.
525+
/// Searches for an element of an iterator from the back that satisfies a predicate.
526526
///
527527
/// `rfind()` takes a closure that returns `true` or `false`. It applies
528528
/// this closure to each element of the iterator, starting at the end, and if any
@@ -545,8 +545,6 @@ pub trait DoubleEndedIterator: Iterator {
545545
/// Basic usage:
546546
///
547547
/// ```
548-
/// #![feature(iter_rfind)]
549-
///
550548
/// let a = [1, 2, 3];
551549
///
552550
/// assert_eq!(a.iter().rfind(|&&x| x == 2), Some(&2));
@@ -557,8 +555,6 @@ pub trait DoubleEndedIterator: Iterator {
557555
/// Stopping at the first `true`:
558556
///
559557
/// ```
560-
/// #![feature(iter_rfind)]
561-
///
562558
/// let a = [1, 2, 3];
563559
///
564560
/// let mut iter = a.iter();
@@ -569,7 +565,7 @@ pub trait DoubleEndedIterator: Iterator {
569565
/// assert_eq!(iter.next_back(), Some(&1));
570566
/// ```
571567
#[inline]
572-
#[unstable(feature = "iter_rfind", issue = "39480")]
568+
#[stable(feature = "iter_rfind", since = "1.27.0")]
573569
fn rfind<P>(&mut self, mut predicate: P) -> Option<Self::Item> where
574570
Self: Sized,
575571
P: FnMut(&Self::Item) -> bool

src/libcore/tests/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
#![feature(iterator_try_fold)]
2929
#![feature(iterator_flatten)]
3030
#![cfg_attr(stage0, feature(conservative_impl_trait))]
31-
#![feature(iter_rfind)]
3231
#![feature(iterator_repeat_with)]
3332
#![feature(nonzero)]
3433
#![feature(pattern)]

0 commit comments

Comments
 (0)