rust/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
ui Auto merge of #7225 - InquisitivePenguin:unnessecary-async, r=llogiq 2021-05-17 06:00:55 +00:00
ui-cargo
ui-internal Metadata collection: Rounding up the implementation 2021-05-05 18:38:26 +02: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
integration.rs
lint_message_convention.rs
missing-test-files.rs
versioncheck.rs