Remove the NodeId of ast::ExprKind::Async

This commit is contained in:
Arpad Borsos 2023-01-31 22:13:25 +01:00
parent 60fe49c54c
commit 1e17a443b3
3 changed files with 3 additions and 3 deletions

View File

@ -42,7 +42,7 @@ fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) {
if expr.span.from_expansion() { if expr.span.from_expansion() {
return; return;
} }
if let ExprKind::Async(_, _, block) = &expr.kind && block.stmts.len() == 1 && if let ExprKind::Async(_, block) = &expr.kind && block.stmts.len() == 1 &&
let Some(Stmt { kind: StmtKind::Expr(last), .. }) = block.stmts.last() && let Some(Stmt { kind: StmtKind::Expr(last), .. }) = block.stmts.last() &&
let ExprKind::Await(future) = &last.kind && let ExprKind::Await(future) = &last.kind &&
!future.span.from_expansion() && !future.span.from_expansion() &&

View File

@ -578,7 +578,7 @@ fn ident_difference_expr_with_base_location(
| (Assign(_, _, _), Assign(_, _, _)) | (Assign(_, _, _), Assign(_, _, _))
| (TryBlock(_), TryBlock(_)) | (TryBlock(_), TryBlock(_))
| (Await(_), Await(_)) | (Await(_), Await(_))
| (Async(_, _, _), Async(_, _, _)) | (Async(_, _), Async(_, _))
| (Block(_, _), Block(_, _)) | (Block(_, _), Block(_, _))
| (Closure(_), Closure(_)) | (Closure(_), Closure(_))
| (Match(_, _), Match(_, _)) | (Match(_, _), Match(_, _))

View File

@ -209,7 +209,7 @@ pub fn eq_expr(l: &Expr, r: &Expr) -> bool {
&& eq_fn_decl(lf, rf) && eq_fn_decl(lf, rf)
&& eq_expr(le, re) && eq_expr(le, re)
}, },
(Async(lc, _, lb), Async(rc, _, rb)) => lc == rc && eq_block(lb, rb), (Async(lc, lb), Async(rc, rb)) => lc == rc && eq_block(lb, rb),
(Range(lf, lt, ll), Range(rf, rt, rl)) => ll == rl && eq_expr_opt(lf, rf) && eq_expr_opt(lt, rt), (Range(lf, lt, ll), Range(rf, rt, rl)) => ll == rl && eq_expr_opt(lf, rf) && eq_expr_opt(lt, rt),
(AddrOf(lbk, lm, le), AddrOf(rbk, rm, re)) => lbk == rbk && lm == rm && eq_expr(le, re), (AddrOf(lbk, lm, le), AddrOf(rbk, rm, re)) => lbk == rbk && lm == rm && eq_expr(le, re),
(Path(lq, lp), Path(rq, rp)) => both(lq, rq, eq_qself) && eq_path(lp, rp), (Path(lq, lp), Path(rq, rp)) => both(lq, rq, eq_qself) && eq_path(lp, rp),