Skip to content

Commit ecebf7e

Browse files
authored
Unrolled build for rust-lang#129294
Rollup merge of rust-lang#129294 - scottmcm:stabilize-repeat-n, r=Noratrieb Stabilize `iter::repeat_n` ACP completed in rust-lang#104434 (comment)
2 parents 5aea140 + dfea11d commit ecebf7e

File tree

5 files changed

+10
-14
lines changed

5 files changed

+10
-14
lines changed

library/alloc/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@
131131
#![feature(inplace_iteration)]
132132
#![feature(iter_advance_by)]
133133
#![feature(iter_next_chunk)]
134-
#![feature(iter_repeat_n)]
135134
#![feature(layout_for_ptr)]
136135
#![feature(local_waker)]
137136
#![feature(maybe_uninit_slice)]

library/core/src/iter/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ pub use self::sources::{once, Once};
436436
pub use self::sources::{once_with, OnceWith};
437437
#[stable(feature = "rust1", since = "1.0.0")]
438438
pub use self::sources::{repeat, Repeat};
439-
#[unstable(feature = "iter_repeat_n", issue = "104434")]
439+
#[stable(feature = "iter_repeat_n", since = "CURRENT_RUSTC_VERSION")]
440440
pub use self::sources::{repeat_n, RepeatN};
441441
#[stable(feature = "iterator_repeat_with", since = "1.28.0")]
442442
pub use self::sources::{repeat_with, RepeatWith};

library/core/src/iter/sources.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pub use self::once::{once, Once};
2424
pub use self::once_with::{once_with, OnceWith};
2525
#[stable(feature = "rust1", since = "1.0.0")]
2626
pub use self::repeat::{repeat, Repeat};
27-
#[unstable(feature = "iter_repeat_n", issue = "104434")]
27+
#[stable(feature = "iter_repeat_n", since = "CURRENT_RUSTC_VERSION")]
2828
pub use self::repeat_n::{repeat_n, RepeatN};
2929
#[stable(feature = "iterator_repeat_with", since = "1.28.0")]
3030
pub use self::repeat_with::{repeat_with, RepeatWith};

library/core/src/iter/sources/repeat_n.rs

+8-10
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ use crate::num::NonZero;
1818
/// Basic usage:
1919
///
2020
/// ```
21-
/// #![feature(iter_repeat_n)]
2221
/// use std::iter;
2322
///
2423
/// // four of the number four:
@@ -36,7 +35,6 @@ use crate::num::NonZero;
3635
/// For non-`Copy` types,
3736
///
3837
/// ```
39-
/// #![feature(iter_repeat_n)]
4038
/// use std::iter;
4139
///
4240
/// let v: Vec<i32> = Vec::with_capacity(123);
@@ -58,7 +56,7 @@ use crate::num::NonZero;
5856
/// assert_eq!(None, it.next());
5957
/// ```
6058
#[inline]
61-
#[unstable(feature = "iter_repeat_n", issue = "104434")]
59+
#[stable(feature = "iter_repeat_n", since = "CURRENT_RUSTC_VERSION")]
6260
pub fn repeat_n<T: Clone>(element: T, count: usize) -> RepeatN<T> {
6361
let mut element = ManuallyDrop::new(element);
6462

@@ -77,7 +75,7 @@ pub fn repeat_n<T: Clone>(element: T, count: usize) -> RepeatN<T> {
7775
/// This `struct` is created by the [`repeat_n()`] function.
7876
/// See its documentation for more.
7977
#[derive(Clone, Debug)]
80-
#[unstable(feature = "iter_repeat_n", issue = "104434")]
78+
#[stable(feature = "iter_repeat_n", since = "CURRENT_RUSTC_VERSION")]
8179
pub struct RepeatN<A> {
8280
count: usize,
8381
// Invariant: has been dropped iff count == 0.
@@ -101,14 +99,14 @@ impl<A> RepeatN<A> {
10199
}
102100
}
103101

104-
#[unstable(feature = "iter_repeat_n", issue = "104434")]
102+
#[stable(feature = "iter_repeat_n", since = "CURRENT_RUSTC_VERSION")]
105103
impl<A> Drop for RepeatN<A> {
106104
fn drop(&mut self) {
107105
self.take_element();
108106
}
109107
}
110108

111-
#[unstable(feature = "iter_repeat_n", issue = "104434")]
109+
#[stable(feature = "iter_repeat_n", since = "CURRENT_RUSTC_VERSION")]
112110
impl<A: Clone> Iterator for RepeatN<A> {
113111
type Item = A;
114112

@@ -156,14 +154,14 @@ impl<A: Clone> Iterator for RepeatN<A> {
156154
}
157155
}
158156

159-
#[unstable(feature = "iter_repeat_n", issue = "104434")]
157+
#[stable(feature = "iter_repeat_n", since = "CURRENT_RUSTC_VERSION")]
160158
impl<A: Clone> ExactSizeIterator for RepeatN<A> {
161159
fn len(&self) -> usize {
162160
self.count
163161
}
164162
}
165163

166-
#[unstable(feature = "iter_repeat_n", issue = "104434")]
164+
#[stable(feature = "iter_repeat_n", since = "CURRENT_RUSTC_VERSION")]
167165
impl<A: Clone> DoubleEndedIterator for RepeatN<A> {
168166
#[inline]
169167
fn next_back(&mut self) -> Option<A> {
@@ -181,12 +179,12 @@ impl<A: Clone> DoubleEndedIterator for RepeatN<A> {
181179
}
182180
}
183181

184-
#[unstable(feature = "iter_repeat_n", issue = "104434")]
182+
#[stable(feature = "iter_repeat_n", since = "CURRENT_RUSTC_VERSION")]
185183
impl<A: Clone> FusedIterator for RepeatN<A> {}
186184

187185
#[unstable(feature = "trusted_len", issue = "37572")]
188186
unsafe impl<A: Clone> TrustedLen for RepeatN<A> {}
189-
#[unstable(feature = "trusted_len_next_unchecked", issue = "37572")]
187+
#[stable(feature = "iter_repeat_n", since = "CURRENT_RUSTC_VERSION")]
190188
impl<A: Clone> UncheckedIterator for RepeatN<A> {
191189
#[inline]
192190
unsafe fn next_unchecked(&mut self) -> Self::Item {

library/core/tests/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@
7373
#![feature(iter_next_chunk)]
7474
#![feature(iter_order_by)]
7575
#![feature(iter_partition_in_place)]
76-
#![feature(iter_repeat_n)]
7776
#![feature(iterator_try_collect)]
7877
#![feature(iterator_try_reduce)]
7978
#![feature(layout_for_ptr)]

0 commit comments

Comments
 (0)