Plumb awaitness of for loops
This commit is contained in:
parent
bf9229a2e3
commit
27d6539a46
26 changed files with 137 additions and 53 deletions
|
@ -4252,11 +4252,11 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> {
|
|||
});
|
||||
}
|
||||
|
||||
ExprKind::ForLoop(ref pat, ref iter_expr, ref block, label) => {
|
||||
self.visit_expr(iter_expr);
|
||||
ExprKind::ForLoop { ref pat, ref iter, ref body, label, kind: _ } => {
|
||||
self.visit_expr(iter);
|
||||
self.with_rib(ValueNS, RibKind::Normal, |this| {
|
||||
this.resolve_pattern_top(pat, PatternSource::For);
|
||||
this.resolve_labeled_block(label, expr.id, block);
|
||||
this.resolve_labeled_block(label, expr.id, body);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -1409,7 +1409,7 @@ impl<'a: 'ast, 'ast, 'tcx> LateResolutionVisitor<'a, '_, 'ast, 'tcx> {
|
|||
| ExprKind::Unary(..)
|
||||
| ExprKind::If(..)
|
||||
| ExprKind::While(..)
|
||||
| ExprKind::ForLoop(..)
|
||||
| ExprKind::ForLoop { .. }
|
||||
| ExprKind::Match(..),
|
||||
..
|
||||
}),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue