diff options
| -rw-r--r-- | compiler/rustc_middle/src/ty/subst.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/compiler/rustc_middle/src/ty/subst.rs b/compiler/rustc_middle/src/ty/subst.rs index c1cf7896db5..d8c1c63d7a3 100644 --- a/compiler/rustc_middle/src/ty/subst.rs +++ b/compiler/rustc_middle/src/ty/subst.rs @@ -589,6 +589,10 @@ where fn next(&mut self) -> Option<Self::Item> { Some(EarlyBinder(self.it.next()?).subst(self.tcx, self.substs)) } + + fn size_hint(&self) -> (usize, Option<usize>) { + self.it.size_hint() + } } impl<'tcx, I: IntoIterator> DoubleEndedIterator for SubstIter<'_, 'tcx, I> @@ -631,6 +635,10 @@ where fn next(&mut self) -> Option<Self::Item> { Some(EarlyBinder(*self.it.next()?).subst(self.tcx, self.substs)) } + + fn size_hint(&self) -> (usize, Option<usize>) { + self.it.size_hint() + } } impl<'tcx, I: IntoIterator> DoubleEndedIterator for SubstIterCopied<'_, 'tcx, I> @@ -660,6 +668,10 @@ impl<T: Iterator> Iterator for EarlyBinderIter<T> { fn next(&mut self) -> Option<Self::Item> { self.t.next().map(|i| EarlyBinder(i)) } + + fn size_hint(&self) -> (usize, Option<usize>) { + self.t.size_hint() + } } impl<'tcx, T: TypeFoldable<'tcx>> ty::EarlyBinder<T> { |
