rust-clippy/tests
bors acdf43f257 Auto merge of #7225 - InquisitivePenguin:unnessecary-async, r=llogiq
New lint: `unused_async`

changelog: Adds a lint, `unused_async`, which checks for async functions with no await statements

`unused_async` is a lint that reduces code smell and overhead by encouraging async functions to be refactored into synchronous functions.

Fixes #7176

### Examples

```rust
async fn get_random_number() -> i64 {
    4 // Chosen by fair dice roll. Guaranteed to be random.
}
```

Could be written as:

```rust
fn get_random_number() -> i64 {
    4 // Chosen by fair dice roll. Guaranteed to be random.
}
```

Something like this, however, should **not** be caught by clippy:
```rust
#[async_trait]
trait AsyncTrait {
    async fn foo();
}

struct Bar;

#[async_trait]
impl AsyncTrait for Bar {
    async fn foo() {
        println!("bar");
    }
}
```
2021-05-17 06:00:55 +00:00
..
auxiliary
cargo Merge commit '2f6439ae6a6803d030cceb3ee14c9150e91b328b' into clippyup 2020-10-09 12:45:29 +02:00
ui Auto merge of #7225 - InquisitivePenguin:unnessecary-async, r=llogiq 2021-05-17 06:00:55 +00:00
ui-cargo Merge commit 'b40ea209e7f14c8193ddfc98143967b6a2f4f5c9' into clippyup 2021-04-08 17:50:13 +02:00
ui-internal Remove all usages of match_path, match_qpath and match_path_ast except the author lint. 2021-04-15 19:27:25 -04:00
ui-toml Fix error punctuation 2021-05-02 16:56:46 -05:00
compile-test.rs Implement x.py test src/tools/clippy --bless 2021-04-27 16:57:29 +00:00
dogfood.rs Added cargo collect-metadata as a alias for the metadata collection lint 2021-05-13 01:41:22 +02:00
fmt.rs Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup 2020-08-28 18:43:25 +02:00
integration.rs Merge commit '4911ab124c481430672a3833b37075e6435ec34d' into clippyup 2020-12-20 17:19:49 +01:00
lint_message_convention.rs Merge commit 'b40ea209e7f14c8193ddfc98143967b6a2f4f5c9' into clippyup 2021-04-08 17:50:13 +02:00
missing-test-files.rs Fix/allow non_fmt_panic in clippy tests. 2021-02-03 23:15:51 +01:00
versioncheck.rs Merge remote-tracking branch 'upstream/master' into rustup 2021-03-11 10:37:58 +01:00