diff options
| author | Scott McMurray <scottmcm@users.noreply.github.com> | 2018-12-19 22:00:25 -0800 |
|---|---|---|
| committer | Scott McMurray <scottmcm@users.noreply.github.com> | 2018-12-19 22:00:25 -0800 |
| commit | 7b6cf6e87b5d0d54687dd56a803d3a86f1994182 (patch) | |
| tree | 480bccc13ee77f4d658100dcc1351dc826996ec0 | |
| parent | daa8792f17ad5484ec1e3b0b1e2557f8603219d0 (diff) | |
| download | rust-7b6cf6e87b5d0d54687dd56a803d3a86f1994182.tar.gz rust-7b6cf6e87b5d0d54687dd56a803d3a86f1994182.zip | |
Stabilize Vec(Deque)::resize_with
Closes #41758
| -rw-r--r-- | src/liballoc/collections/vec_deque.rs | 4 | ||||
| -rw-r--r-- | src/liballoc/vec.rs | 4 | ||||
| -rw-r--r-- | src/librustc_data_structures/lib.rs | 1 |
3 files changed, 2 insertions, 7 deletions
diff --git a/src/liballoc/collections/vec_deque.rs b/src/liballoc/collections/vec_deque.rs index 0c5926fbaf1..99b1ad8d6e2 100644 --- a/src/liballoc/collections/vec_deque.rs +++ b/src/liballoc/collections/vec_deque.rs @@ -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(); diff --git a/src/liballoc/vec.rs b/src/liballoc/vec.rs index 63af69dda1d..b78e71331a9 100644 --- a/src/liballoc/vec.rs +++ b/src/liballoc/vec.rs @@ -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 { diff --git a/src/librustc_data_structures/lib.rs b/src/librustc_data_structures/lib.rs index bc2b8f1d652..9e29b2798d8 100644 --- a/src/librustc_data_structures/lib.rs +++ b/src/librustc_data_structures/lib.rs @@ -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)] |
