We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent affd708 commit 5b672a0Copy full SHA for 5b672a0
core/src/array/mod.rs
@@ -41,16 +41,14 @@ pub use iter::IntoIter;
41
///
42
/// Creating multiple copies of a `String`:
43
/// ```rust
44
-/// #![feature(array_repeat)]
45
-///
46
/// use std::array;
47
48
/// let string = "Hello there!".to_string();
49
/// let strings = array::repeat(string);
50
/// assert_eq!(strings, ["Hello there!", "Hello there!"]);
51
/// ```
52
#[inline]
53
-#[unstable(feature = "array_repeat", issue = "126695")]
+#[stable(feature = "array_repeat", since = "CURRENT_RUSTC_VERSION")]
54
pub fn repeat<T: Clone, const N: usize>(val: T) -> [T; N] {
55
from_trusted_iterator(repeat_n(val, N))
56
}
0 commit comments