Skip to content

Commit 4a2ae45

Browse files
committed
Stabilize slice::repeat (feature repeat_generic_slice)
1 parent 7130fc5 commit 4a2ae45

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

src/liballoc/slice.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -411,20 +411,16 @@ impl<T> [T] {
411411
/// Basic usage:
412412
///
413413
/// ```
414-
/// #![feature(repeat_generic_slice)]
415414
/// assert_eq!([1, 2].repeat(3), vec![1, 2, 1, 2, 1, 2]);
416415
/// ```
417416
///
418417
/// A panic upon overflow:
419418
///
420419
/// ```should_panic
421-
/// #![feature(repeat_generic_slice)]
422420
/// // this will panic at runtime
423421
/// b"0123456789abcdef".repeat(usize::max_value());
424422
/// ```
425-
#[unstable(feature = "repeat_generic_slice",
426-
reason = "it's on str, why not on slice?",
427-
issue = "48784")]
423+
#[stable(feature = "repeat_generic_slice", since = "1.40.0")]
428424
pub fn repeat(&self, n: usize) -> Vec<T> where T: Copy {
429425
if n == 0 {
430426
return Vec::new();

src/liballoc/tests/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#![feature(exact_size_is_empty)]
55
#![feature(option_flattening)]
66
#![feature(pattern)]
7-
#![feature(repeat_generic_slice)]
87
#![feature(trusted_len)]
98
#![feature(try_reserve)]
109
#![feature(unboxed_closures)]

0 commit comments

Comments
 (0)