diff options
| author | Stuart Cook <Zalathar@users.noreply.github.com> | 2025-08-30 20:29:06 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-30 20:29:06 +1000 |
| commit | b5c19e839f177592e39691f779b0f8b057471a1a (patch) | |
| tree | 0216976d7c8acf5bc504535e896f49acd57417bf | |
| parent | eda6dc928323fcd0ac1b51cea1aa79ab17e8519d (diff) | |
| parent | 489940ee1d24a0a2bc388b465f171da9ab0cb16b (diff) | |
| download | rust-b5c19e839f177592e39691f779b0f8b057471a1a.tar.gz rust-b5c19e839f177592e39691f779b0f8b057471a1a.zip | |
Rollup merge of #145465 - Kivooeo:stabilize-array_repeat, r=joboet
Stabilize `array_repeat` feature This closes [tracking issue](https://github.com/rust-lang/rust/issues/126695) and stabilises `array::repeat`
| -rw-r--r-- | library/core/src/array/mod.rs | 4 | ||||
| -rw-r--r-- | tests/codegen-llvm/array-repeat.rs | 1 | ||||
| -rw-r--r-- | tests/codegen-llvm/iter-repeat-n-trivial-drop.rs | 1 |
3 files changed, 1 insertions, 5 deletions
diff --git a/library/core/src/array/mod.rs b/library/core/src/array/mod.rs index 835ee57ce23..c4bb5ab7b21 100644 --- a/library/core/src/array/mod.rs +++ b/library/core/src/array/mod.rs @@ -41,8 +41,6 @@ pub use iter::IntoIter; /// /// Creating multiple copies of a `String`: /// ```rust -/// #![feature(array_repeat)] -/// /// use std::array; /// /// let string = "Hello there!".to_string(); @@ -50,7 +48,7 @@ pub use iter::IntoIter; /// assert_eq!(strings, ["Hello there!", "Hello there!"]); /// ``` #[inline] -#[unstable(feature = "array_repeat", issue = "126695")] +#[stable(feature = "array_repeat", since = "CURRENT_RUSTC_VERSION")] pub fn repeat<T: Clone, const N: usize>(val: T) -> [T; N] { from_trusted_iterator(repeat_n(val, N)) } diff --git a/tests/codegen-llvm/array-repeat.rs b/tests/codegen-llvm/array-repeat.rs index 4c755df9390..1c45341d764 100644 --- a/tests/codegen-llvm/array-repeat.rs +++ b/tests/codegen-llvm/array-repeat.rs @@ -1,7 +1,6 @@ //@ compile-flags: -Copt-level=3 #![crate_type = "lib"] -#![feature(array_repeat)] use std::array::repeat; diff --git a/tests/codegen-llvm/iter-repeat-n-trivial-drop.rs b/tests/codegen-llvm/iter-repeat-n-trivial-drop.rs index 28173530324..6f340978428 100644 --- a/tests/codegen-llvm/iter-repeat-n-trivial-drop.rs +++ b/tests/codegen-llvm/iter-repeat-n-trivial-drop.rs @@ -4,7 +4,6 @@ #![crate_type = "lib"] #![feature(iter_repeat_n)] -#![feature(array_repeat)] #[derive(Clone)] pub struct NotCopy(u16); |
