From 6fcc62b3ac446e4fc36a360b7207c29bef40b26c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20du=20Garreau?= Date: Mon, 28 Jun 2021 00:22:52 +0200 Subject: [PATCH] Add unstable attribute for `A` in `Drain` and `IntoIter` --- library/alloc/src/collections/vec_deque/drain.rs | 6 +++++- library/alloc/src/collections/vec_deque/into_iter.rs | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/library/alloc/src/collections/vec_deque/drain.rs b/library/alloc/src/collections/vec_deque/drain.rs index 4f68279129e..dfa0227dea3 100644 --- a/library/alloc/src/collections/vec_deque/drain.rs +++ b/library/alloc/src/collections/vec_deque/drain.rs @@ -13,7 +13,11 @@ use super::{count, Iter, VecDeque}; /// /// [`drain`]: VecDeque::drain #[stable(feature = "drain", since = "1.6.0")] -pub struct Drain<'a, T: 'a, A: Allocator = Global> { +pub struct Drain< + 'a, + T: 'a, + #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global, +> { pub(crate) after_tail: usize, pub(crate) after_head: usize, pub(crate) iter: Iter<'a, T>, diff --git a/library/alloc/src/collections/vec_deque/into_iter.rs b/library/alloc/src/collections/vec_deque/into_iter.rs index 4263878aa17..5f13c3bf303 100644 --- a/library/alloc/src/collections/vec_deque/into_iter.rs +++ b/library/alloc/src/collections/vec_deque/into_iter.rs @@ -13,7 +13,10 @@ use super::VecDeque; /// [`into_iter`]: VecDeque::into_iter #[derive(Clone)] #[stable(feature = "rust1", since = "1.0.0")] -pub struct IntoIter { +pub struct IntoIter< + T, + #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global, +> { pub(crate) inner: VecDeque, }