async_yields_async
What it does
Checks for async blocks that yield values of types that can themselves be awaited.
Why is this bad?
An await is likely missing.
Example
code:rust
async fn foo() {}
fn bar() {
let x = async {
foo()
};
}
Use instead
code:rust
async fn foo() {}
fn bar() {
let x = async {
foo().await
};
}