mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
fix: unused_async FP for stubs with args
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
@@ -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!()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user