Files
rust/tests/ui
bors e8403a892b Auto merge of #11200 - y21:issue9695, r=Jarcho
[`unused_async`]: don't lint if paths reference async fn without immediate call

Fixes #9695
Fixes #9359

Clippy shouldn't lint unused `async` if there are paths referencing them if that path isn't the receiver of a function call, because that means that the function might be passed to some other function:
```rs
async fn f() {} // No await statements, so unused at this point

fn requires_fn_future<F: Future<Output = ()>>(_: fn() -> F) {}
requires_fn_future(f); // `f`'s asyncness is actually not unused.
```
(This isn't limited to just passing the function as a parameter to another function, it could also first be stored in a variable and later passed to another function as an argument)

This requires delaying the linting until post-crate and collecting path references to local async functions along the way.

changelog: [`unused_async`]: don't lint if paths reference async fn that require asyncness
2023-07-22 20:40:48 +00:00
..
2022-10-01 10:03:06 +00:00
2022-10-01 10:03:06 +00:00
2022-10-01 10:03:06 +00:00
2022-10-01 10:03:06 +00:00
2023-05-24 11:06:56 -05:00
2022-10-01 10:03:06 +00:00
2022-10-01 10:03:06 +00:00
2022-10-01 10:03:06 +00:00
2022-10-01 10:03:06 +00:00
2023-07-01 07:08:01 -04:00
2023-07-08 13:02:54 -05:00
2022-10-01 10:03:06 +00:00
2022-10-01 10:03:06 +00:00
2022-10-01 10:03:06 +00:00
2022-10-01 10:03:06 +00:00
2022-10-01 10:03:06 +00:00
2022-10-01 10:03:06 +00:00
2022-10-01 10:03:06 +00:00
2023-07-01 07:08:01 -04:00
2023-07-08 13:02:54 -05:00
2023-07-08 13:02:54 -05:00
2022-10-01 10:03:06 +00:00
2022-10-01 10:03:06 +00:00
2022-10-01 10:03:06 +00:00
2022-10-01 10:03:06 +00:00
2023-07-01 07:08:01 -04:00
2023-07-01 07:08:01 -04:00
2023-07-01 07:08:01 -04:00
2023-03-08 14:40:38 +00:00
2023-03-08 14:40:38 +00:00
2023-07-01 07:08:01 -04:00
2023-07-01 07:08:01 -04:00
2023-07-01 07:08:01 -04:00
2022-10-01 10:03:06 +00:00
2022-10-01 10:03:06 +00:00
2022-10-01 10:03:06 +00:00
2022-10-01 10:03:06 +00:00
2023-04-27 17:18:12 +00:00
2022-10-01 10:03:06 +00:00
2022-10-01 10:03:06 +00:00
2022-10-01 10:03:06 +00:00
2022-10-01 10:03:06 +00:00
2022-10-01 10:03:06 +00:00
2022-10-01 10:03:06 +00:00
2022-10-01 10:03:06 +00:00
2023-07-19 03:26:15 -05:00
2023-07-19 03:26:15 -05:00
2023-07-19 03:26:15 -05:00
2023-07-01 07:08:01 -04:00
2022-10-01 10:03:06 +00:00
2022-10-01 10:03:06 +00:00
2023-07-01 07:08:01 -04:00
2022-10-01 10:03:06 +00:00
2022-10-01 10:03:06 +00:00
2023-07-01 07:08:01 -04:00
2023-07-01 07:08:01 -04:00
2022-10-01 10:03:06 +00:00
2023-07-01 07:08:01 -04:00
2023-07-01 07:08:01 -04:00
2022-10-01 10:03:06 +00:00
2023-07-01 07:08:01 -04:00
2022-10-01 10:03:06 +00:00
2023-07-01 07:08:01 -04:00
2022-10-01 10:03:06 +00:00
2022-10-01 10:03:06 +00:00
2022-10-01 10:03:06 +00:00
2023-07-01 07:08:01 -04:00
2023-07-08 19:11:15 -04:00
2023-07-08 19:11:15 -04:00
2023-07-02 07:11:05 -05:00
2023-07-01 07:08:01 -04:00
2022-10-01 10:03:06 +00:00
2023-07-01 07:08:01 -04:00
2022-10-01 10:03:06 +00:00
2022-10-01 10:03:06 +00:00
2023-07-01 07:08:01 -04:00
2022-10-01 10:03:06 +00:00
2023-07-01 07:08:01 -04:00
2022-10-01 10:03:06 +00:00
2022-10-01 10:03:06 +00:00
2022-10-01 10:03:06 +00:00
2023-07-22 06:28:05 -05:00
2023-07-21 18:14:03 -07:00
2023-07-10 18:12:41 +02:00
2022-10-01 10:03:06 +00:00
2022-10-01 10:03:06 +00:00
2022-10-01 10:03:06 +00:00
2022-10-01 10:03:06 +00:00
2023-07-22 06:28:05 -05:00
2023-07-22 06:28:05 -05:00
2022-10-01 10:03:06 +00:00
2022-10-01 10:03:06 +00:00
2023-07-01 07:08:01 -04:00
2023-07-22 06:28:05 -05:00
2023-07-22 06:28:05 -05:00
2023-07-22 06:28:05 -05:00
2022-10-01 10:03:06 +00:00
2022-10-01 10:03:06 +00:00
2023-07-01 07:08:01 -04:00
2022-10-01 10:03:06 +00:00
2023-07-01 07:08:01 -04:00
2022-10-01 10:03:06 +00:00
2022-10-01 10:03:06 +00:00
2022-10-01 10:03:06 +00:00
2023-07-21 18:14:03 -07:00
2023-07-21 18:14:03 -07:00
2023-07-21 18:14:03 -07:00
2023-07-01 07:08:01 -04:00
2022-10-01 10:03:06 +00:00
2023-07-01 07:08:01 -04:00
2023-06-19 00:36:16 +02:00
2023-06-19 00:36:16 +02:00
2022-10-01 10:03:06 +00:00
2023-07-01 07:08:01 -04:00
2022-10-01 10:03:06 +00:00
2022-06-16 18:00:32 +04:00
2022-10-01 10:03:06 +00:00
2022-10-01 10:03:06 +00:00
2022-10-01 10:03:06 +00:00
2022-10-01 10:03:06 +00:00
2022-10-01 10:03:06 +00:00
2023-07-01 07:08:01 -04:00
2022-10-01 10:03:06 +00:00
2022-10-01 10:03:06 +00:00
2022-10-01 10:03:06 +00:00
2022-10-01 10:03:06 +00:00
2022-10-01 10:03:06 +00:00
2022-10-01 10:03:06 +00:00