about summary refs log tree commit diff
path: root/library/alloc/src/vec
diff options
context:
space:
mode:
Diffstat (limited to 'library/alloc/src/vec')
-rw-r--r--library/alloc/src/vec/into_iter.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/library/alloc/src/vec/into_iter.rs b/library/alloc/src/vec/into_iter.rs
index 8fed4a584a3..f6525eb9003 100644
--- a/library/alloc/src/vec/into_iter.rs
+++ b/library/alloc/src/vec/into_iter.rs
@@ -348,7 +348,10 @@ impl<T, A: Allocator> FusedIterator for IntoIter<T, A> {}
 unsafe impl<T, A: Allocator> TrustedLen for IntoIter<T, A> {}
 
 #[stable(feature = "default_iters", since = "CURRENT_RUSTC_VERSION")]
-impl<T> Default for IntoIter<T> {
+impl<T, A> Default for IntoIter<T, A>
+where
+    A: Allocator + Default,
+{
     /// Creates an empty `vec::IntoIter`.
     ///
     /// ```
@@ -358,7 +361,7 @@ impl<T> Default for IntoIter<T> {
     /// assert_eq!(iter.as_slice(), &[]);
     /// ```
     fn default() -> Self {
-        super::Vec::new().into_iter()
+        super::Vec::new_in(Default::default()).into_iter()
     }
 }