diff --git a/clippy_lints/src/unused_async.rs b/clippy_lints/src/unused_async.rs index a4ebd8860dc0..f5e903426d57 100644 --- a/clippy_lints/src/unused_async.rs +++ b/clippy_lints/src/unused_async.rs @@ -211,7 +211,6 @@ fn async_fn_contains_todo_unimplemented_macro(cx: &LateContext<'_>, body: &Body< && let ClosureKind::Coroutine(CoroutineKind::Desugared(CoroutineDesugaring::Async, _)) = closure.kind && let body = cx.tcx.hir_body(closure.body) && let ExprKind::Block(block, _) = body.value.kind - && block.stmts.is_empty() && let Some(expr) = block.expr && let ExprKind::DropTemps(inner) = expr.kind { diff --git a/tests/ui/unused_async.rs b/tests/ui/unused_async.rs index 3f9244ab4970..b6780d240b17 100644 --- a/tests/ui/unused_async.rs +++ b/tests/ui/unused_async.rs @@ -134,3 +134,14 @@ async fn unimplemented_task() -> Result<(), String> { unimplemented!("Implement task"); } } + +mod issue16835 { + async fn todo_task(_arg: i32) { + todo!() + } + + async fn unimplemented_task(_arg: i32) { + let a = 1; + unimplemented!() + } +}