Remove the NodeId
of ast::ExprKind::Async
This commit is contained in:
parent
ab9bb3ea36
commit
c8ead2e693
14 changed files with 56 additions and 64 deletions
|
@ -1426,13 +1426,9 @@ pub enum ExprKind {
|
|||
Block(P<Block>, Option<Label>),
|
||||
/// An async block (`async move { ... }`).
|
||||
///
|
||||
/// The `NodeId` is the `NodeId` for the closure that results from
|
||||
/// desugaring an async block, just like the NodeId field in the
|
||||
/// `Async::Yes` variant. This is necessary in order to create a def for the
|
||||
/// closure which can be used as a parent of any child defs. Defs
|
||||
/// created during lowering cannot be made the parent of any other
|
||||
/// preexisting defs.
|
||||
Async(CaptureBy, NodeId, P<Block>),
|
||||
/// The async block used to have a `NodeId`, which was removed in favor of
|
||||
/// using the parent `NodeId` of the parent `Expr`.
|
||||
Async(CaptureBy, P<Block>),
|
||||
/// An await expression (`my_future.await`).
|
||||
Await(P<Expr>),
|
||||
|
||||
|
|
|
@ -1407,8 +1407,7 @@ pub fn noop_visit_expr<T: MutVisitor>(
|
|||
vis.visit_block(blk);
|
||||
visit_opt(label, |label| vis.visit_label(label));
|
||||
}
|
||||
ExprKind::Async(_capture_by, node_id, body) => {
|
||||
vis.visit_id(node_id);
|
||||
ExprKind::Async(_capture_by, body) => {
|
||||
vis.visit_block(body);
|
||||
}
|
||||
ExprKind::Await(expr) => vis.visit_expr(expr),
|
||||
|
|
|
@ -860,7 +860,7 @@ pub fn walk_expr<'a, V: Visitor<'a>>(visitor: &mut V, expression: &'a Expr) {
|
|||
walk_list!(visitor, visit_label, opt_label);
|
||||
visitor.visit_block(block);
|
||||
}
|
||||
ExprKind::Async(_, _, body) => {
|
||||
ExprKind::Async(_, body) => {
|
||||
visitor.visit_block(body);
|
||||
}
|
||||
ExprKind::Await(expr) => visitor.visit_expr(expr),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue