Rollup merge of #93016 - Amanieu:vec_spare_capacity, r=Mark-Simulacrum
Stabilize vec_spare_capacity Closes #75017
This commit is contained in:
commit
83b1a9452a
5 changed files with 4 additions and 8 deletions
|
@ -2051,8 +2051,6 @@ impl<T, A: Allocator> Vec<T, A> {
|
|||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(vec_spare_capacity)]
|
||||
///
|
||||
/// // Allocate vector big enough for 10 elements.
|
||||
/// let mut v = Vec::with_capacity(10);
|
||||
///
|
||||
|
@ -2069,7 +2067,7 @@ impl<T, A: Allocator> Vec<T, A> {
|
|||
///
|
||||
/// assert_eq!(&v, &[0, 1, 2]);
|
||||
/// ```
|
||||
#[unstable(feature = "vec_spare_capacity", issue = "75017")]
|
||||
#[stable(feature = "vec_spare_capacity", since = "1.60.0")]
|
||||
#[inline]
|
||||
pub fn spare_capacity_mut(&mut self) -> &mut [MaybeUninit<T>] {
|
||||
// Note:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue