Rollup merge of #52858 - frewsxcv:frewsxcv-elaborator, r=SimonSapin
Implement Iterator::size_hint for Elaborator. None
This commit is contained in:
commit
2578036f47
@ -239,6 +239,10 @@ fn push(&mut self, predicate: &ty::Predicate<'tcx>) {
|
||||
impl<'cx, 'gcx, 'tcx> Iterator for Elaborator<'cx, 'gcx, 'tcx> {
|
||||
type Item = ty::Predicate<'tcx>;
|
||||
|
||||
fn size_hint(&self) -> (usize, Option<usize>) {
|
||||
(self.stack.len(), None)
|
||||
}
|
||||
|
||||
fn next(&mut self) -> Option<ty::Predicate<'tcx>> {
|
||||
// Extract next item from top-most stack frame, if any.
|
||||
let next_predicate = match self.stack.pop() {
|
||||
|
Loading…
Reference in New Issue
Block a user