diff options
| author | Simon Sapin <simon.sapin@exyr.org> | 2020-07-21 23:08:27 +0200 |
|---|---|---|
| committer | Simon Sapin <simon.sapin@exyr.org> | 2020-07-29 10:53:55 +0200 |
| commit | 7d759f539f363125511f1edd9ad30934367f409b (patch) | |
| tree | bb9d3db0934fa78c3855006a05cf0189dc2496ff /library | |
| parent | d8bcf75206e88e07cabd95b87418fe98c5fa2b95 (diff) | |
| download | rust-7d759f539f363125511f1edd9ad30934367f409b.tar.gz rust-7d759f539f363125511f1edd9ad30934367f409b.zip | |
Stabilize `Vec::leak`
Diffstat (limited to 'library')
| -rw-r--r-- | library/alloc/src/vec.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/library/alloc/src/vec.rs b/library/alloc/src/vec.rs index 3414060a556..9eb37bf473f 100644 --- a/library/alloc/src/vec.rs +++ b/library/alloc/src/vec.rs @@ -1510,14 +1510,12 @@ impl<T> Vec<T> { /// Simple usage: /// /// ``` - /// #![feature(vec_leak)] - /// /// let x = vec![1, 2, 3]; /// let static_ref: &'static mut [usize] = x.leak(); /// static_ref[0] += 1; /// assert_eq!(static_ref, &[2, 2, 3]); /// ``` - #[unstable(feature = "vec_leak", issue = "62195")] + #[stable(feature = "vec_leak", since = "1.47.0")] #[inline] pub fn leak<'a>(self) -> &'a mut [T] where |
