Skip to content

Commit fc327c3

Browse files
authored
Rollup merge of rust-lang#145465 - Kivooeo:stabilize-array_repeat, r=joboet
Stabilize `array_repeat` feature This closes [tracking issue](rust-lang#126695) and stabilises `array::repeat`
2 parents 4c98f51 + 5b672a0 commit fc327c3

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

core/src/array/mod.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,14 @@ pub use iter::IntoIter;
4141
///
4242
/// Creating multiple copies of a `String`:
4343
/// ```rust
44-
/// #![feature(array_repeat)]
45-
///
4644
/// use std::array;
4745
///
4846
/// let string = "Hello there!".to_string();
4947
/// let strings = array::repeat(string);
5048
/// assert_eq!(strings, ["Hello there!", "Hello there!"]);
5149
/// ```
5250
#[inline]
53-
#[unstable(feature = "array_repeat", issue = "126695")]
51+
#[stable(feature = "array_repeat", since = "CURRENT_RUSTC_VERSION")]
5452
pub fn repeat<T: Clone, const N: usize>(val: T) -> [T; N] {
5553
from_trusted_iterator(repeat_n(val, N))
5654
}

0 commit comments

Comments
 (0)