Skip to content

Commit 7d759f5

Browse files
committed
Stabilize Vec::leak
1 parent d8bcf75 commit 7d759f5

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

library/alloc/src/vec.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -1510,14 +1510,12 @@ impl<T> Vec<T> {
15101510
/// Simple usage:
15111511
///
15121512
/// ```
1513-
/// #![feature(vec_leak)]
1514-
///
15151513
/// let x = vec![1, 2, 3];
15161514
/// let static_ref: &'static mut [usize] = x.leak();
15171515
/// static_ref[0] += 1;
15181516
/// assert_eq!(static_ref, &[2, 2, 3]);
15191517
/// ```
1520-
#[unstable(feature = "vec_leak", issue = "62195")]
1518+
#[stable(feature = "vec_leak", since = "1.47.0")]
15211519
#[inline]
15221520
pub fn leak<'a>(self) -> &'a mut [T]
15231521
where

0 commit comments

Comments
 (0)