Skip to content

Commit 5f71374

Browse files
committed
Stabilize Vec::leak
1 parent 67213b4 commit 5f71374

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

alloc/src/vec.rs

Lines changed: 1 addition & 3 deletions
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)