Skip to content

Commit 5350164

Browse files
committed
Stabilize Vec::leak
1 parent 76a49ef commit 5350164

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/liballoc/vec.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -1512,14 +1512,12 @@ impl<T> Vec<T> {
15121512
/// Simple usage:
15131513
///
15141514
/// ```
1515-
/// #![feature(vec_leak)]
1516-
///
15171515
/// let x = vec![1, 2, 3];
15181516
/// let static_ref: &'static mut [usize] = x.leak();
15191517
/// static_ref[0] += 1;
15201518
/// assert_eq!(static_ref, &[2, 2, 3]);
15211519
/// ```
1522-
#[unstable(feature = "vec_leak", issue = "62195")]
1520+
#[stable(feature = "vec_leak", since = "1.47.0")]
15231521
#[inline]
15241522
pub fn leak<'a>(self) -> &'a mut [T]
15251523
where

0 commit comments

Comments
 (0)