diff --git a/src/libcollections/binary_heap.rs b/src/libcollections/binary_heap.rs index fca3b7b07dd2..93b864a007fc 100644 --- a/src/libcollections/binary_heap.rs +++ b/src/libcollections/binary_heap.rs @@ -228,17 +228,12 @@ pub struct PeekMut<'a, T: 'a + Ord> { sift: bool, } -#[stable(feature = "collection_debug", since = "1.15.0")] -impl<'a, T: Ord> fmt::Debug for PeekMut<'a, T> { - default fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.pad("PeekMut { .. }") - } -} - #[stable(feature = "collection_debug", since = "1.15.0")] impl<'a, T: Ord + fmt::Debug> fmt::Debug for PeekMut<'a, T> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.pad(&format!("PeekMut({:?})", self.heap.data[0])) + f.debug_tuple("PeekMut") + .field(&self.heap.data[0]) + .finish() } } @@ -982,13 +977,6 @@ pub struct Iter<'a, T: 'a> { iter: slice::Iter<'a, T>, } -#[stable(feature = "collection_debug", since = "1.15.0")] -impl<'a, T: 'a> fmt::Debug for Iter<'a, T> { - default fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.pad("BinaryHeap::Iter { .. }") - } -} - #[stable(feature = "collection_debug", since = "1.15.0")] impl<'a, T: 'a + fmt::Debug> fmt::Debug for Iter<'a, T> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { @@ -1046,13 +1034,6 @@ pub struct IntoIter { iter: vec::IntoIter, } -#[stable(feature = "collection_debug", since = "1.15.0")] -impl fmt::Debug for IntoIter { - default fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.pad("BinaryHeap::IntoIter { .. }") - } -} - #[stable(feature = "collection_debug", since = "1.15.0")] impl fmt::Debug for IntoIter { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { @@ -1101,17 +1082,12 @@ pub struct Drain<'a, T: 'a> { iter: vec::Drain<'a, T>, } -#[stable(feature = "collection_debug", since = "1.15.0")] -impl<'a, T: 'a> fmt::Debug for Drain<'a, T> { - default fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.pad("BinaryHeap::Drain { .. }") - } -} - #[stable(feature = "collection_debug", since = "1.15.0")] impl<'a, T: 'a + fmt::Debug> fmt::Debug for Drain<'a, T> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.pad(&format!("BinaryHeap::Drain({:?})", self.iter)) + f.debug_tuple("BinaryHeap::Drain") + .field(&self.iter) + .finish() } } diff --git a/src/libcollections/btree/map.rs b/src/libcollections/btree/map.rs index 0d8b9d4677bd..eb6a8ea26a3b 100644 --- a/src/libcollections/btree/map.rs +++ b/src/libcollections/btree/map.rs @@ -270,13 +270,6 @@ pub struct Iter<'a, K: 'a, V: 'a> { length: usize, } -#[stable(feature = "collection_debug", since = "1.15.0")] -impl<'a, K: 'a, V: 'a> fmt::Debug for Iter<'a, K, V> { - default fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.pad("BTreeMap::Iter { .. }") - } -} - #[stable(feature = "collection_debug", since = "1.15.0")] impl<'a, K: 'a + fmt::Debug, V: 'a + fmt::Debug> fmt::Debug for Iter<'a, K, V> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { @@ -291,13 +284,6 @@ pub struct IterMut<'a, K: 'a, V: 'a> { length: usize, } -#[stable(feature = "collection_debug", since = "1.15.0")] -impl<'a, K: 'a, V: 'a> fmt::Debug for IterMut<'a, K, V> { - default fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.pad("BTreeMap::IterMut { .. }") - } -} - #[stable(feature = "collection_debug", since = "1.15.0")] impl<'a, K: 'a + fmt::Debug, V: 'a + fmt::Debug> fmt::Debug for IterMut<'a, K, V> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { @@ -313,13 +299,6 @@ pub struct IntoIter { length: usize, } -#[stable(feature = "collection_debug", since = "1.15.0")] -impl fmt::Debug for IntoIter { - default fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.pad("BTreeMap::IntoIter { .. }") - } -} - #[stable(feature = "collection_debug", since = "1.15.0")] impl fmt::Debug for IntoIter { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { @@ -337,13 +316,6 @@ pub struct Keys<'a, K: 'a, V: 'a> { inner: Iter<'a, K, V>, } -#[stable(feature = "collection_debug", since = "1.15.0")] -impl<'a, K: 'a, V: 'a> fmt::Debug for Keys<'a, K, V> { - default fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.pad("BTreeMap::Keys { .. }") - } -} - #[stable(feature = "collection_debug", since = "1.15.0")] impl<'a, K: 'a + fmt::Debug, V: 'a + fmt::Debug> fmt::Debug for Keys<'a, K, V> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { @@ -357,13 +329,6 @@ pub struct Values<'a, K: 'a, V: 'a> { inner: Iter<'a, K, V>, } -#[stable(feature = "collection_debug", since = "1.15.0")] -impl<'a, K: 'a, V: 'a> fmt::Debug for Values<'a, K, V> { - default fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.pad("BTreeMap::Values { .. }") - } -} - #[stable(feature = "collection_debug", since = "1.15.0")] impl<'a, K: 'a + fmt::Debug, V: 'a + fmt::Debug> fmt::Debug for Values<'a, K, V> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { @@ -377,13 +342,6 @@ pub struct ValuesMut<'a, K: 'a, V: 'a> { inner: IterMut<'a, K, V>, } -#[stable(feature = "collection_debug", since = "1.15.0")] -impl<'a, K: 'a, V: 'a> fmt::Debug for ValuesMut<'a, K, V> { - default fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.pad("BTreeMap::ValuesMut { .. }") - } -} - #[stable(feature = "collection_debug", since = "1.15.0")] impl<'a, K: 'a + fmt::Debug, V: 'a + fmt::Debug> fmt::Debug for ValuesMut<'a, K, V> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { @@ -397,13 +355,6 @@ pub struct Range<'a, K: 'a, V: 'a> { back: Handle, K, V, marker::Leaf>, marker::Edge>, } -#[stable(feature = "collection_debug", since = "1.15.0")] -impl<'a, K: 'a, V: 'a> fmt::Debug for Range<'a, K, V> { - default fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.pad("BTreeMap::Range { .. }") - } -} - #[stable(feature = "collection_debug", since = "1.15.0")] impl<'a, K: 'a + fmt::Debug, V: 'a + fmt::Debug> fmt::Debug for Range<'a, K, V> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { @@ -420,13 +371,6 @@ pub struct RangeMut<'a, K: 'a, V: 'a> { _marker: PhantomData<&'a mut (K, V)>, } -#[stable(feature = "collection_debug", since = "1.15.0")] -impl<'a, K: 'a, V: 'a> fmt::Debug for RangeMut<'a, K, V> { - default fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.pad("BTreeMap::RangeMut { .. }") - } -} - #[stable(feature = "collection_debug", since = "1.15.0")] impl<'a, K: 'a + fmt::Debug, V: 'a + fmt::Debug> fmt::Debug for RangeMut<'a, K, V> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { diff --git a/src/libcollections/btree/set.rs b/src/libcollections/btree/set.rs index d9effde72042..f90d0df768b9 100644 --- a/src/libcollections/btree/set.rs +++ b/src/libcollections/btree/set.rs @@ -85,13 +85,6 @@ pub struct Iter<'a, T: 'a> { iter: Keys<'a, T, ()>, } -#[stable(feature = "collection_debug", since = "1.15.0")] -impl<'a, T: 'a> fmt::Debug for Iter<'a, T> { - default fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.pad("BTreeSet::Iter { .. }") - } -} - #[stable(feature = "collection_debug", since = "1.15.0")] impl<'a, T: 'a + fmt::Debug> fmt::Debug for Iter<'a, T> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { @@ -112,13 +105,6 @@ pub struct IntoIter { iter: ::btree_map::IntoIter, } -#[stable(feature = "collection_debug", since = "1.15.0")] -impl fmt::Debug for IntoIter { - default fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.pad("BTreeSet::IntoIter { .. }") - } -} - #[stable(feature = "collection_debug", since = "1.15.0")] impl fmt::Debug for IntoIter { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { @@ -136,13 +122,6 @@ pub struct Range<'a, T: 'a> { iter: ::btree_map::Range<'a, T, ()>, } -#[stable(feature = "collection_debug", since = "1.15.0")] -impl<'a, T: 'a> fmt::Debug for Range<'a, T> { - default fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.pad("BTreeSet::Range { .. }") - } -} - #[stable(feature = "collection_debug", since = "1.15.0")] impl<'a, T: 'a + fmt::Debug> fmt::Debug for Range<'a, T> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { @@ -162,13 +141,6 @@ pub struct Difference<'a, T: 'a> { b: Peekable>, } -#[stable(feature = "collection_debug", since = "1.15.0")] -impl<'a, T: 'a> fmt::Debug for Difference<'a, T> { - default fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.pad("BTreeSet::Difference { .. }") - } -} - #[stable(feature = "collection_debug", since = "1.15.0")] impl<'a, T: 'a + fmt::Debug> fmt::Debug for Difference<'a, T> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { @@ -191,13 +163,6 @@ pub struct SymmetricDifference<'a, T: 'a> { b: Peekable>, } -#[stable(feature = "collection_debug", since = "1.15.0")] -impl<'a, T: 'a> fmt::Debug for SymmetricDifference<'a, T> { - default fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.pad("BTreeSet::SymmetricDifference { .. }") - } -} - #[stable(feature = "collection_debug", since = "1.15.0")] impl<'a, T: 'a + fmt::Debug> fmt::Debug for SymmetricDifference<'a, T> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { @@ -219,13 +184,6 @@ pub struct Intersection<'a, T: 'a> { b: Peekable>, } -#[stable(feature = "collection_debug", since = "1.15.0")] -impl<'a, T: 'a> fmt::Debug for Intersection<'a, T> { - default fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.pad("BTreeSet::Intersection { .. }") - } -} - #[stable(feature = "collection_debug", since = "1.15.0")] impl<'a, T: 'a + fmt::Debug> fmt::Debug for Intersection<'a, T> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { @@ -247,13 +205,6 @@ pub struct Union<'a, T: 'a> { b: Peekable>, } -#[stable(feature = "collection_debug", since = "1.15.0")] -impl<'a, T: 'a> fmt::Debug for Union<'a, T> { - default fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.pad("BTreeSet::Union { .. }") - } -} - #[stable(feature = "collection_debug", since = "1.15.0")] impl<'a, T: 'a + fmt::Debug> fmt::Debug for Union<'a, T> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { diff --git a/src/libcollections/enum_set.rs b/src/libcollections/enum_set.rs index 3e739fa4f957..e4498c176170 100644 --- a/src/libcollections/enum_set.rs +++ b/src/libcollections/enum_set.rs @@ -220,13 +220,6 @@ pub struct Iter { marker: marker::PhantomData, } -#[stable(feature = "collection_debug", since = "1.15.0")] -impl fmt::Debug for Iter { - default fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.pad("EnumSet::Iter { .. }") - } -} - #[stable(feature = "collection_debug", since = "1.15.0")] impl fmt::Debug for Iter { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { diff --git a/src/libcollections/linked_list.rs b/src/libcollections/linked_list.rs index 112749d5b058..21be9ac1aab8 100644 --- a/src/libcollections/linked_list.rs +++ b/src/libcollections/linked_list.rs @@ -65,13 +65,6 @@ pub struct Iter<'a, T: 'a> { marker: PhantomData<&'a Node>, } -#[stable(feature = "collection_debug", since = "1.15.0")] -impl<'a, T: 'a> fmt::Debug for Iter<'a, T> { - default fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.pad("LinkedList::Iter { .. }") - } -} - #[stable(feature = "collection_debug", since = "1.15.0")] impl<'a, T: 'a + fmt::Debug> fmt::Debug for Iter<'a, T> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { @@ -98,13 +91,6 @@ pub struct IterMut<'a, T: 'a> { len: usize, } -#[stable(feature = "collection_debug", since = "1.15.0")] -impl<'a, T: 'a> fmt::Debug for IterMut<'a, T> { - default fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.pad("LinkedList::IterMut { .. }") - } -} - #[stable(feature = "collection_debug", since = "1.15.0")] impl<'a, T: 'a + fmt::Debug> fmt::Debug for IterMut<'a, T> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { @@ -121,13 +107,6 @@ pub struct IntoIter { list: LinkedList, } -#[stable(feature = "collection_debug", since = "1.15.0")] -impl fmt::Debug for IntoIter { - default fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.pad("LinkedList::IntoIter { .. }") - } -} - #[stable(feature = "collection_debug", since = "1.15.0")] impl fmt::Debug for IntoIter { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { @@ -1125,13 +1104,6 @@ pub struct FrontPlace<'a, T: 'a> { node: IntermediateBox>, } -#[stable(feature = "collection_debug", since = "1.15.0")] -impl<'a, T: 'a> fmt::Debug for FrontPlace<'a, T> { - default fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.pad("LinkedList::FrontPlace { .. }") - } -} - #[stable(feature = "collection_debug", since = "1.15.0")] impl<'a, T: 'a + fmt::Debug> fmt::Debug for FrontPlace<'a, T> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { @@ -1185,13 +1157,6 @@ pub struct BackPlace<'a, T: 'a> { node: IntermediateBox>, } -#[stable(feature = "collection_debug", since = "1.15.0")] -impl<'a, T: 'a> fmt::Debug for BackPlace<'a, T> { - default fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.pad("LinkedList::BackPlace { .. }") - } -} - #[stable(feature = "collection_debug", since = "1.15.0")] impl<'a, T: 'a + fmt::Debug> fmt::Debug for BackPlace<'a, T> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { diff --git a/src/libcollections/vec.rs b/src/libcollections/vec.rs index 4f6212a1709a..2b6343782b19 100644 --- a/src/libcollections/vec.rs +++ b/src/libcollections/vec.rs @@ -2092,13 +2092,6 @@ pub struct Drain<'a, T: 'a> { vec: Shared>, } -#[stable(feature = "collection_debug", since = "1.15.0")] -impl<'a, T: 'a> fmt::Debug for Drain<'a, T> { - default fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.pad("Vec::Drain { .. }") - } -} - #[stable(feature = "collection_debug", since = "1.15.0")] impl<'a, T: 'a + fmt::Debug> fmt::Debug for Drain<'a, T> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { @@ -2178,13 +2171,6 @@ pub struct PlaceBack<'a, T: 'a> { vec: &'a mut Vec, } -#[stable(feature = "collection_debug", since = "1.15.0")] -impl<'a, T: 'a> fmt::Debug for PlaceBack<'a, T> { - default fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.pad("Vec::PlaceBack { .. }") - } -} - #[stable(feature = "collection_debug", since = "1.15.0")] impl<'a, T: 'a + fmt::Debug> fmt::Debug for PlaceBack<'a, T> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { diff --git a/src/libcollections/vec_deque.rs b/src/libcollections/vec_deque.rs index dfbfb240f460..11aacb0ff43d 100644 --- a/src/libcollections/vec_deque.rs +++ b/src/libcollections/vec_deque.rs @@ -1866,13 +1866,6 @@ pub struct Iter<'a, T: 'a> { head: usize, } -#[stable(feature = "collection_debug", since = "1.15.0")] -impl<'a, T: 'a> fmt::Debug for Iter<'a, T> { - default fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.pad("VecDeque::Iter { .. }") - } -} - #[stable(feature = "collection_debug", since = "1.15.0")] impl<'a, T: 'a + fmt::Debug> fmt::Debug for Iter<'a, T> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { @@ -1954,13 +1947,6 @@ pub struct IterMut<'a, T: 'a> { head: usize, } -#[stable(feature = "collection_debug", since = "1.15.0")] -impl<'a, T: 'a> fmt::Debug for IterMut<'a, T> { - default fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.pad("VecDeque::IterMut { .. }") - } -} - #[stable(feature = "collection_debug", since = "1.15.0")] impl<'a, T: 'a + fmt::Debug> fmt::Debug for IterMut<'a, T> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { @@ -2036,13 +2022,6 @@ pub struct IntoIter { inner: VecDeque, } -#[stable(feature = "collection_debug", since = "1.15.0")] -impl fmt::Debug for IntoIter { - default fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.pad("VecDeque::IntoIter { .. }") - } -} - #[stable(feature = "collection_debug", since = "1.15.0")] impl fmt::Debug for IntoIter { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { @@ -2095,13 +2074,6 @@ pub struct Drain<'a, T: 'a> { deque: Shared>, } -#[stable(feature = "collection_debug", since = "1.15.0")] -impl<'a, T: 'a> fmt::Debug for Drain<'a, T> { - default fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.pad("VecDeque::Drain { .. }") - } -} - #[stable(feature = "collection_debug", since = "1.15.0")] impl<'a, T: 'a + fmt::Debug> fmt::Debug for Drain<'a, T> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {