]> git.lizzy.rs Git - rust.git/commit
Add a lint for an async block/closure that yields a type that is itself awaitable.
authorKyle Huey <khuey@kylehuey.com>
Sat, 15 Aug 2020 00:30:48 +0000 (17:30 -0700)
committerKyle Huey <khuey@kylehuey.com>
Sat, 29 Aug 2020 22:33:54 +0000 (15:33 -0700)
commit4972989b616cbf96c015cd9fdf1f4b4464ecaace
tree08b2ca3af70dc01dad8d4b173ae76ee79f0b3554
parentc88c6149415dd47b5f05e69d7307e0a1967c33f2
Add a lint for an async block/closure that yields a type that is itself awaitable.

This catches bugs of the form

tokio::spawn(async move {
    let f = some_async_thing();
    f // Oh no I forgot to await f so that work will never complete.
});
CHANGELOG.md
clippy_lints/src/async_yields_async.rs [new file with mode: 0644]
clippy_lints/src/lib.rs
src/lintlist/mod.rs
tests/ui/async_yields_async.fixed [new file with mode: 0644]
tests/ui/async_yields_async.rs [new file with mode: 0644]
tests/ui/async_yields_async.stderr [new file with mode: 0644]