Skip to content

Commit

Permalink
Auto merge of rust-lang#9374 - sk1p:patch-1, r=Jarcho
Browse files Browse the repository at this point in the history
uninit_vec: Vec::spare_capacity_mut is stable

Quick documentation fix: `Vec::spare_capacity_mut` no longer needs nightly.

changelog: none
  • Loading branch information
bors committed Aug 26, 2022
2 parents 21f103a + 61aa4ef commit 602bec2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clippy_lints/src/uninit_vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ declare_clippy_lint! {
/// let mut vec: Vec<MaybeUninit<T>> = Vec::with_capacity(1000);
/// vec.set_len(1000); // `MaybeUninit` can be uninitialized
/// ```
/// 3. If you are on nightly, `Vec::spare_capacity_mut()` is available:
/// 3. If you are on 1.60.0 or later, `Vec::spare_capacity_mut()` is available:
/// ```rust,ignore
/// let mut vec: Vec<u8> = Vec::with_capacity(1000);
/// let remaining = vec.spare_capacity_mut(); // `&mut [MaybeUninit<u8>]`
Expand Down

0 comments on commit 602bec2

Please sign in to comment.