Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix debug infinite loop #41342

Merged
merged 1 commit into from
Apr 21, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions src/libcollections/btree/set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ pub struct Difference<'a, T: 'a> {
impl<'a, T: 'a + fmt::Debug> fmt::Debug for Difference<'a, T> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_tuple("Difference")
.field(&self.clone())
.field(&self.a)
.field(&self.b)
.finish()
}
}
Expand All @@ -160,7 +161,8 @@ pub struct SymmetricDifference<'a, T: 'a> {
impl<'a, T: 'a + fmt::Debug> fmt::Debug for SymmetricDifference<'a, T> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_tuple("SymmetricDifference")
.field(&self.clone())
.field(&self.a)
.field(&self.b)
.finish()
}
}
Expand All @@ -182,7 +184,8 @@ pub struct Intersection<'a, T: 'a> {
impl<'a, T: 'a + fmt::Debug> fmt::Debug for Intersection<'a, T> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_tuple("Intersection")
.field(&self.clone())
.field(&self.a)
.field(&self.b)
.finish()
}
}
Expand All @@ -204,7 +207,8 @@ pub struct Union<'a, T: 'a> {
impl<'a, T: 'a + fmt::Debug> fmt::Debug for Union<'a, T> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_tuple("Union")
.field(&self.clone())
.field(&self.a)
.field(&self.b)
.finish()
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/libcollections/enum_set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,8 @@ pub struct Iter<E> {
impl<E: fmt::Debug> fmt::Debug for Iter<E> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_tuple("Iter")
.field(&self.clone())
.field(&self.index)
.field(&self.bits)
.finish()
}
}
Expand Down
11 changes: 6 additions & 5 deletions src/libcollections/linked_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ pub struct Iter<'a, T: 'a> {
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())
.field(&self.len)
.finish()
}
}
Expand Down Expand Up @@ -107,7 +107,8 @@ pub struct IterMut<'a, T: 'a> {
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())
.field(&self.list)
.field(&self.len)
.finish()
}
}
Expand All @@ -129,7 +130,7 @@ pub struct IntoIter<T> {
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())
.field(&self.list)
.finish()
}
}
Expand Down Expand Up @@ -1128,7 +1129,7 @@ pub struct FrontPlace<'a, T: 'a> {
impl<'a, T: 'a + fmt::Debug> fmt::Debug for FrontPlace<'a, T> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_tuple("FrontPlace")
.field(self.clone())
.field(&self.list)
.finish()
}
}
Expand Down Expand Up @@ -1183,7 +1184,7 @@ pub struct BackPlace<'a, T: 'a> {
impl<'a, T: 'a + fmt::Debug> fmt::Debug for BackPlace<'a, T> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_tuple("BackPlace")
.field(self.clone())
.field(&self.list)
.finish()
}
}
Expand Down
14 changes: 10 additions & 4 deletions src/libcollections/vec_deque.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1913,7 +1913,9 @@ pub struct Iter<'a, T: 'a> {
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())
.field(&self.ring)
.field(&self.tail)
.field(&self.head)
.finish()
}
}
Expand Down Expand Up @@ -2000,7 +2002,9 @@ pub struct IterMut<'a, T: 'a> {
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())
.field(&self.ring)
.field(&self.tail)
.field(&self.head)
.finish()
}
}
Expand Down Expand Up @@ -2081,7 +2085,7 @@ pub struct IntoIter<T> {
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())
.field(&self.inner)
.finish()
}
}
Expand Down Expand Up @@ -2139,7 +2143,9 @@ pub struct Drain<'a, T: 'a> {
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())
.field(&self.after_tail)
.field(&self.after_head)
.field(&self.iter)
.finish()
}
}
Expand Down