diff options
| author | Sean McArthur <sean.monstar@gmail.com> | 2016-03-04 18:49:43 -0800 |
|---|---|---|
| committer | Sean McArthur <sean.monstar@gmail.com> | 2016-03-20 10:04:55 -0700 |
| commit | e0945937c4d6786af0b03a11c8cec2c34cde7662 (patch) | |
| tree | 1a167e7ea6907b8638bd1141a47b81808180f21e /src/libcore/option.rs | |
| parent | 235d77457d80b549dad3ac36d94f235208a1eafb (diff) | |
| download | rust-e0945937c4d6786af0b03a11c8cec2c34cde7662.tar.gz rust-e0945937c4d6786af0b03a11c8cec2c34cde7662.zip | |
libcore: add Debug implementations to most missing types
Diffstat (limited to 'src/libcore/option.rs')
| -rw-r--r-- | src/libcore/option.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libcore/option.rs b/src/libcore/option.rs index 56b84fd6a64..dd60e8797a9 100644 --- a/src/libcore/option.rs +++ b/src/libcore/option.rs @@ -763,7 +763,7 @@ impl<'a, T> IntoIterator for &'a mut Option<T> { // The Option Iterators ///////////////////////////////////////////////////////////////////////////// -#[derive(Clone)] +#[derive(Clone, Debug)] struct Item<A> { opt: Option<A> } @@ -796,6 +796,7 @@ impl<A> ExactSizeIterator for Item<A> {} /// An iterator over a reference of the contained item in an Option. #[stable(feature = "rust1", since = "1.0.0")] +#[derive(Debug)] pub struct Iter<'a, A: 'a> { inner: Item<&'a A> } #[stable(feature = "rust1", since = "1.0.0")] @@ -826,6 +827,7 @@ impl<'a, A> Clone for Iter<'a, A> { /// An iterator over a mutable reference of the contained item in an Option. #[stable(feature = "rust1", since = "1.0.0")] +#[derive(Debug)] pub struct IterMut<'a, A: 'a> { inner: Item<&'a mut A> } #[stable(feature = "rust1", since = "1.0.0")] @@ -848,7 +850,7 @@ impl<'a, A> DoubleEndedIterator for IterMut<'a, A> { impl<'a, A> ExactSizeIterator for IterMut<'a, A> {} /// An iterator over the item contained inside an Option. -#[derive(Clone)] +#[derive(Clone, Debug)] #[stable(feature = "rust1", since = "1.0.0")] pub struct IntoIter<A> { inner: Item<A> } |
