Rollup merge of #93016 - Amanieu:vec_spare_capacity, r=Mark-Simulacrum
Stabilize vec_spare_capacity Closes #75017
This commit is contained in:
@@ -2051,8 +2051,6 @@ impl<T, A: Allocator> Vec<T, A> {
|
|||||||
/// # Examples
|
/// # Examples
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(vec_spare_capacity)]
|
|
||||||
///
|
|
||||||
/// // Allocate vector big enough for 10 elements.
|
/// // Allocate vector big enough for 10 elements.
|
||||||
/// let mut v = Vec::with_capacity(10);
|
/// let mut v = Vec::with_capacity(10);
|
||||||
///
|
///
|
||||||
@@ -2069,7 +2067,7 @@ impl<T, A: Allocator> Vec<T, A> {
|
|||||||
///
|
///
|
||||||
/// assert_eq!(&v, &[0, 1, 2]);
|
/// assert_eq!(&v, &[0, 1, 2]);
|
||||||
/// ```
|
/// ```
|
||||||
#[unstable(feature = "vec_spare_capacity", issue = "75017")]
|
#[stable(feature = "vec_spare_capacity", since = "1.60.0")]
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn spare_capacity_mut(&mut self) -> &mut [MaybeUninit<T>] {
|
pub fn spare_capacity_mut(&mut self) -> &mut [MaybeUninit<T>] {
|
||||||
// Note:
|
// Note:
|
||||||
|
|||||||
@@ -31,7 +31,6 @@
|
|||||||
#![feature(iter_advance_by)]
|
#![feature(iter_advance_by)]
|
||||||
#![feature(slice_group_by)]
|
#![feature(slice_group_by)]
|
||||||
#![feature(slice_partition_dedup)]
|
#![feature(slice_partition_dedup)]
|
||||||
#![feature(vec_spare_capacity)]
|
|
||||||
#![feature(string_remove_matches)]
|
#![feature(string_remove_matches)]
|
||||||
#![feature(const_btree_new)]
|
#![feature(const_btree_new)]
|
||||||
#![feature(const_default_impls)]
|
#![feature(const_default_impls)]
|
||||||
|
|||||||
@@ -1038,7 +1038,7 @@ impl<T> MaybeUninit<T> {
|
|||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(maybe_uninit_write_slice, vec_spare_capacity)]
|
/// #![feature(maybe_uninit_write_slice)]
|
||||||
/// use std::mem::MaybeUninit;
|
/// use std::mem::MaybeUninit;
|
||||||
///
|
///
|
||||||
/// let mut vec = Vec::with_capacity(32);
|
/// let mut vec = Vec::with_capacity(32);
|
||||||
@@ -1098,7 +1098,7 @@ impl<T> MaybeUninit<T> {
|
|||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(maybe_uninit_write_slice, vec_spare_capacity)]
|
/// #![feature(maybe_uninit_write_slice)]
|
||||||
/// use std::mem::MaybeUninit;
|
/// use std::mem::MaybeUninit;
|
||||||
///
|
///
|
||||||
/// let mut vec = Vec::with_capacity(32);
|
/// let mut vec = Vec::with_capacity(32);
|
||||||
|
|||||||
@@ -340,7 +340,6 @@
|
|||||||
#![feature(unboxed_closures)]
|
#![feature(unboxed_closures)]
|
||||||
#![feature(unwrap_infallible)]
|
#![feature(unwrap_infallible)]
|
||||||
#![feature(vec_into_raw_parts)]
|
#![feature(vec_into_raw_parts)]
|
||||||
#![feature(vec_spare_capacity)]
|
|
||||||
// NB: the above list is sorted to minimize merge conflicts.
|
// NB: the above list is sorted to minimize merge conflicts.
|
||||||
#![default_lib_allocator]
|
#![default_lib_allocator]
|
||||||
|
|
||||||
|
|||||||
Submodule library/stdarch updated: 2adc17a544...1d5d0e8b0e
Reference in New Issue
Block a user