2023-07-20 22:50:01 +00:00
|
|
|
error: unused `async` for function with no await statements
|
|
|
|
--> $DIR/unused_async.rs:45:5
|
|
|
|
|
|
|
|
|
LL | async fn f3() {}
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: consider removing the `async` from this function
|
|
|
|
= note: `-D clippy::unused-async` implied by `-D warnings`
|
|
|
|
|
|
|
|
error: unused `async` for function with no await statements
|
|
|
|
--> $DIR/unused_async.rs:57:1
|
|
|
|
|
|
|
|
|
LL | / async fn foo() -> i32 {
|
|
|
|
LL | | 4
|
|
|
|
LL | | }
|
|
|
|
| |_^
|
|
|
|
|
|
|
|
|
= help: consider removing the `async` from this function
|
|
|
|
|
2021-05-20 10:30:31 +00:00
|
|
|
error: unused `async` for function with no await statements
|
2023-06-27 20:00:00 +00:00
|
|
|
--> $DIR/unused_async.rs:13:5
|
2023-05-21 21:07:30 +00:00
|
|
|
|
|
|
|
|
LL | / async fn async_block_await() {
|
|
|
|
LL | | async {
|
|
|
|
LL | | ready(()).await;
|
|
|
|
LL | | };
|
|
|
|
LL | | }
|
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
= help: consider removing the `async` from this function
|
2023-05-23 15:22:23 +00:00
|
|
|
note: `await` used in an async block, which does not require the enclosing function to be `async`
|
2023-06-27 20:00:00 +00:00
|
|
|
--> $DIR/unused_async.rs:15:23
|
2023-05-23 15:22:23 +00:00
|
|
|
|
|
|
|
|
LL | ready(()).await;
|
|
|
|
| ^^^^^
|
2021-05-20 10:30:31 +00:00
|
|
|
|
2022-06-30 08:50:09 +00:00
|
|
|
error: unused `async` for function with no await statements
|
2023-07-20 22:50:01 +00:00
|
|
|
--> $DIR/unused_async.rs:68:5
|
2022-06-30 08:50:09 +00:00
|
|
|
|
|
|
|
|
LL | / async fn unused(&self) -> i32 {
|
|
|
|
LL | | 1
|
|
|
|
LL | | }
|
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
= help: consider removing the `async` from this function
|
|
|
|
|
2023-07-20 22:50:01 +00:00
|
|
|
error: aborting due to 4 previous errors
|
2021-05-20 10:30:31 +00:00
|
|
|
|