]> git.lizzy.rs Git - rust.git/commit
manual_async_fn: take input lifetimes into account
authorEduardo Broto <ebroto@tutanota.com>
Sun, 2 Aug 2020 22:36:28 +0000 (00:36 +0200)
committerEduardo Broto <ebroto@tutanota.com>
Sun, 2 Aug 2020 22:36:28 +0000 (00:36 +0200)
commite336fe80d2f991a170b98190683039035b53c6ba
treecb74acda51e039a26bd164f31f7a7e837b5fc804
parent2e0f8b6cc61c1673991120639d6b104a195f755e
manual_async_fn: take input lifetimes into account

The anonymous future returned from an `async fn` captures all input
lifetimes. This was not being taken into account.

See https://github.com/rust-lang/rfcs/blob/master/text/2394-async_await.md#lifetime-capture-in-the-anonymous-future
clippy_lints/src/manual_async_fn.rs
tests/ui/await_holding_lock.rs
tests/ui/await_holding_lock.stderr
tests/ui/manual_async_fn.fixed
tests/ui/manual_async_fn.rs
tests/ui/manual_async_fn.stderr