about summary refs log tree commit diff
path: root/src/liballoc/slice.rs
diff options
context:
space:
mode:
authorLzu Tao <taolzu@gmail.com>2019-09-28 16:39:07 +0000
committerLzu Tao <taolzu@gmail.com>2019-10-02 04:48:15 +0000
commit4a2ae451e3b4807cd98013a10025ec0d2cdfecbe (patch)
treecf9873443a187178abeeb2884eff1e3d3a60bb9f /src/liballoc/slice.rs
parent7130fc54e05e247f93c7ecc2d10f56b314c97831 (diff)
downloadrust-4a2ae451e3b4807cd98013a10025ec0d2cdfecbe.tar.gz
rust-4a2ae451e3b4807cd98013a10025ec0d2cdfecbe.zip
Stabilize `slice::repeat` (feature `repeat_generic_slice`)
Diffstat (limited to 'src/liballoc/slice.rs')
-rw-r--r--src/liballoc/slice.rs6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/liballoc/slice.rs b/src/liballoc/slice.rs
index 4e4a285c21d..08243ef7c51 100644
--- a/src/liballoc/slice.rs
+++ b/src/liballoc/slice.rs
@@ -411,20 +411,16 @@ impl<T> [T] {
     /// Basic usage:
     ///
     /// ```
-    /// #![feature(repeat_generic_slice)]
     /// assert_eq!([1, 2].repeat(3), vec![1, 2, 1, 2, 1, 2]);
     /// ```
     ///
     /// A panic upon overflow:
     ///
     /// ```should_panic
-    /// #![feature(repeat_generic_slice)]
     /// // this will panic at runtime
     /// b"0123456789abcdef".repeat(usize::max_value());
     /// ```
-    #[unstable(feature = "repeat_generic_slice",
-               reason = "it's on str, why not on slice?",
-               issue = "48784")]
+    #[stable(feature = "repeat_generic_slice", since = "1.40.0")]
     pub fn repeat(&self, n: usize) -> Vec<T> where T: Copy {
         if n == 0 {
             return Vec::new();