mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-27 06:14:55 +00:00
parent
daa8792f17
commit
7b6cf6e87b
@ -1897,8 +1897,6 @@ impl<T> VecDeque<T> {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(vec_resize_with)]
|
||||
///
|
||||
/// use std::collections::VecDeque;
|
||||
///
|
||||
/// let mut buf = VecDeque::new();
|
||||
@ -1917,7 +1915,7 @@ impl<T> VecDeque<T> {
|
||||
/// buf.resize_with(5, || { state += 1; state });
|
||||
/// assert_eq!(buf, [5, 10, 101, 102, 103]);
|
||||
/// ```
|
||||
#[unstable(feature = "vec_resize_with", issue = "41758")]
|
||||
#[stable(feature = "vec_resize_with", since = "1.33.0")]
|
||||
pub fn resize_with(&mut self, new_len: usize, generator: impl FnMut()->T) {
|
||||
let len = self.len();
|
||||
|
||||
|
@ -1241,8 +1241,6 @@ impl<T> Vec<T> {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(vec_resize_with)]
|
||||
///
|
||||
/// let mut vec = vec![1, 2, 3];
|
||||
/// vec.resize_with(5, Default::default);
|
||||
/// assert_eq!(vec, [1, 2, 3, 0, 0]);
|
||||
@ -1255,7 +1253,7 @@ impl<T> Vec<T> {
|
||||
///
|
||||
/// [`resize`]: #method.resize
|
||||
/// [`Clone`]: ../../std/clone/trait.Clone.html
|
||||
#[unstable(feature = "vec_resize_with", issue = "41758")]
|
||||
#[stable(feature = "vec_resize_with", since = "1.33.0")]
|
||||
pub fn resize_with<F>(&mut self, new_len: usize, f: F)
|
||||
where F: FnMut() -> T
|
||||
{
|
||||
|
@ -28,7 +28,6 @@
|
||||
#![feature(optin_builtin_traits)]
|
||||
#![feature(nll)]
|
||||
#![feature(allow_internal_unstable)]
|
||||
#![feature(vec_resize_with)]
|
||||
#![feature(hash_raw_entry)]
|
||||
#![feature(stmt_expr_attributes)]
|
||||
#![feature(core_intrinsics)]
|
||||
|
Loading…
Reference in New Issue
Block a user