diff options
Diffstat (limited to 'src/libcollections/vec_deque.rs')
| -rw-r--r-- | src/libcollections/vec_deque.rs | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/libcollections/vec_deque.rs b/src/libcollections/vec_deque.rs index 5e1adb3d808..8d42045ff16 100644 --- a/src/libcollections/vec_deque.rs +++ b/src/libcollections/vec_deque.rs @@ -1856,6 +1856,15 @@ pub struct Iter<'a, T: 'a> { head: usize, } +#[stable(feature = "collection_debug", since = "1.17.0")] +impl<'a, T: 'a + fmt::Debug> fmt::Debug for Iter<'a, T> { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + f.debug_tuple("Iter") + .field(&self.clone()) + .finish() + } +} + // FIXME(#19839) Remove in favor of `#[derive(Clone)]` #[stable(feature = "rust1", since = "1.0.0")] impl<'a, T> Clone for Iter<'a, T> { @@ -1928,6 +1937,15 @@ pub struct IterMut<'a, T: 'a> { head: usize, } +#[stable(feature = "collection_debug", since = "1.17.0")] +impl<'a, T: 'a + fmt::Debug> fmt::Debug for IterMut<'a, T> { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + f.debug_tuple("IterMut") + .field(&self.clone()) + .finish() + } +} + #[stable(feature = "rust1", since = "1.0.0")] impl<'a, T> Iterator for IterMut<'a, T> { type Item = &'a mut T; @@ -1994,6 +2012,15 @@ pub struct IntoIter<T> { inner: VecDeque<T>, } +#[stable(feature = "collection_debug", since = "1.17.0")] +impl<T: fmt::Debug> fmt::Debug for IntoIter<T> { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + f.debug_tuple("IntoIter") + .field(&self.clone()) + .finish() + } +} + #[stable(feature = "rust1", since = "1.0.0")] impl<T> Iterator for IntoIter<T> { type Item = T; @@ -2037,6 +2064,15 @@ pub struct Drain<'a, T: 'a> { deque: Shared<VecDeque<T>>, } +#[stable(feature = "collection_debug", since = "1.17.0")] +impl<'a, T: 'a + fmt::Debug> fmt::Debug for Drain<'a, T> { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + f.debug_tuple("Drain") + .field(&self.clone()) + .finish() + } +} + #[stable(feature = "drain", since = "1.6.0")] unsafe impl<'a, T: Sync> Sync for Drain<'a, T> {} #[stable(feature = "drain", since = "1.6.0")] |
