Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions library/core/src/array/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,14 @@ pub use iter::IntoIter;
///
/// Creating multiple copies of a `String`:
/// ```rust
/// #![feature(array_repeat)]
///
/// use std::array;
///
/// let string = "Hello there!".to_string();
/// let strings = array::repeat(string);
/// 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))
}
Expand Down
1 change: 0 additions & 1 deletion tests/codegen-llvm/array-repeat.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//@ compile-flags: -Copt-level=3

#![crate_type = "lib"]
#![feature(array_repeat)]

use std::array::repeat;

Expand Down
1 change: 0 additions & 1 deletion tests/codegen-llvm/iter-repeat-n-trivial-drop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

#![crate_type = "lib"]
#![feature(iter_repeat_n)]
#![feature(array_repeat)]

#[derive(Clone)]
pub struct NotCopy(u16);
Expand Down
Loading