about summary refs log tree commit diff
path: root/clippy_lints/src
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2023-03-27 18:56:19 +0200
committerGitHub <noreply@github.com>2023-03-27 18:56:19 +0200
commit538e8bdcc8d4402c0c4bb95eb47162ca4e11f74d (patch)
tree1bdfe8a4b71305d11a15b53b0e25d24bc1fa317e /clippy_lints/src
parentdb4e4afce8f87eb73db3808981215cd28e97095d (diff)
parent1e17a443b347098085981f4cb9df9313aedaaae0 (diff)
downloadrust-538e8bdcc8d4402c0c4bb95eb47162ca4e11f74d.tar.gz
rust-538e8bdcc8d4402c0c4bb95eb47162ca4e11f74d.zip
Rollup merge of #109354 - Swatinem:rm-closureid, r=compiler-errors
Remove the `NodeId` of `ast::ExprKind::Async`

This is a followup to https://github.com/rust-lang/rust/pull/104833#pullrequestreview-1314537416.

In my original attempt, I was using `LoweringContext::expr`, which was not correct as it creates a fresh `DefId`.
It now uses the correct `DefId` for the wrapping `Expr`, and also makes forwarding `#[track_caller]` attributes more explicit.
Diffstat (limited to 'clippy_lints/src')
-rw-r--r--clippy_lints/src/redundant_async_block.rs2
-rw-r--r--clippy_lints/src/suspicious_operation_groupings.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/clippy_lints/src/redundant_async_block.rs b/clippy_lints/src/redundant_async_block.rs
index 2d30e77d55d..5ac203665d0 100644
--- a/clippy_lints/src/redundant_async_block.rs
+++ b/clippy_lints/src/redundant_async_block.rs
@@ -42,7 +42,7 @@ impl EarlyLintPass for RedundantAsyncBlock {
         if expr.span.from_expansion() {
             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 ExprKind::Await(future) = &last.kind &&
             !future.span.from_expansion() &&
diff --git a/clippy_lints/src/suspicious_operation_groupings.rs b/clippy_lints/src/suspicious_operation_groupings.rs
index 8aa47b62ebf..fab8e9c2ec1 100644
--- a/clippy_lints/src/suspicious_operation_groupings.rs
+++ b/clippy_lints/src/suspicious_operation_groupings.rs
@@ -578,7 +578,7 @@ fn ident_difference_expr_with_base_location(
         | (Assign(_, _, _), Assign(_, _, _))
         | (TryBlock(_), TryBlock(_))
         | (Await(_), Await(_))
-        | (Async(_, _, _), Async(_, _, _))
+        | (Async(_, _), Async(_, _))
         | (Block(_, _), Block(_, _))
         | (Closure(_), Closure(_))
         | (Match(_, _), Match(_, _))