We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Vec::leak
1 parent d8bcf75 commit 7d759f5Copy full SHA for 7d759f5
library/alloc/src/vec.rs
@@ -1510,14 +1510,12 @@ impl<T> Vec<T> {
1510
/// Simple usage:
1511
///
1512
/// ```
1513
- /// #![feature(vec_leak)]
1514
- ///
1515
/// let x = vec![1, 2, 3];
1516
/// let static_ref: &'static mut [usize] = x.leak();
1517
/// static_ref[0] += 1;
1518
/// assert_eq!(static_ref, &[2, 2, 3]);
1519
1520
- #[unstable(feature = "vec_leak", issue = "62195")]
+ #[stable(feature = "vec_leak", since = "1.47.0")]
1521
#[inline]
1522
pub fn leak<'a>(self) -> &'a mut [T]
1523
where
0 commit comments