Add gen blocks to ast and do some broken ast lowering
This commit is contained in:
parent
14423080f1
commit
621494382d
21 changed files with 131 additions and 56 deletions
|
@ -260,7 +260,7 @@ impl<'a, 'b, 'tcx> visit::Visitor<'a> for DefCollector<'a, 'b, 'tcx> {
|
|||
Async::No => closure_def,
|
||||
}
|
||||
}
|
||||
ExprKind::Async(_, _) => self.create_def(expr.id, DefPathData::ClosureExpr, expr.span),
|
||||
ExprKind::Gen(_, _, _) => self.create_def(expr.id, DefPathData::ClosureExpr, expr.span),
|
||||
_ => self.parent_def,
|
||||
};
|
||||
|
||||
|
|
|
@ -4321,7 +4321,7 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> {
|
|||
);
|
||||
}
|
||||
ExprKind::Closure(..) => visit::walk_expr(self, expr),
|
||||
ExprKind::Async(..) => {
|
||||
ExprKind::Gen(..) => {
|
||||
self.with_label_rib(RibKind::ClosureOrAsync, |this| visit::walk_expr(this, expr));
|
||||
}
|
||||
ExprKind::Repeat(ref elem, ref ct) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue