diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs index 89de2c953e4c2..7965c00a36510 100644 --- a/src/liballoc/boxed.rs +++ b/src/liballoc/boxed.rs @@ -194,6 +194,10 @@ impl<'a, T> Iterator for Box + 'a> { fn next(&mut self) -> Option { (**self).next() } + + fn size_hint(&self) -> (usize, Option) { + (**self).size_hint() + } } #[cfg(test)] diff --git a/src/libcore/iter.rs b/src/libcore/iter.rs index 3d51f75d9b309..2a21ceef7a152 100644 --- a/src/libcore/iter.rs +++ b/src/libcore/iter.rs @@ -107,6 +107,10 @@ impl<'a, T> Iterator for &'a mut (Iterator + 'a) { fn next(&mut self) -> Option { (**self).next() } + + fn size_hint(&self) -> (usize, Option) { + (**self).size_hint() + } } /// Conversion from an `Iterator`