Skip to content

Commit

Permalink
Rollup merge of #93016 - Amanieu:vec_spare_capacity, r=Mark-Simulacrum
Browse files Browse the repository at this point in the history
Stabilize vec_spare_capacity

Closes #75017
  • Loading branch information
matthiaskrgr authored Jan 18, 2022
2 parents b8c544d + e012b9a commit 83b1a94
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 8 deletions.
4 changes: 1 addition & 3 deletions library/alloc/src/vec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
///
Expand All @@ -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:
Expand Down
1 change: 0 additions & 1 deletion library/alloc/tests/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#![feature(iter_advance_by)]
#![feature(slice_group_by)]
#![feature(slice_partition_dedup)]
#![feature(vec_spare_capacity)]
#![feature(string_remove_matches)]
#![feature(const_btree_new)]
#![feature(const_default_impls)]
Expand Down
4 changes: 2 additions & 2 deletions library/core/src/mem/maybe_uninit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
///
/// let mut vec = Vec::with_capacity(32);
Expand Down Expand Up @@ -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;
///
/// let mut vec = Vec::with_capacity(32);
Expand Down
1 change: 0 additions & 1 deletion library/std/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,6 @@
#![feature(unboxed_closures)]
#![feature(unwrap_infallible)]
#![feature(vec_into_raw_parts)]
#![feature(vec_spare_capacity)]
// NB: the above list is sorted to minimize merge conflicts.
#![default_lib_allocator]

Expand Down
2 changes: 1 addition & 1 deletion library/stdarch

0 comments on commit 83b1a94

Please sign in to comment.