2021-05-20 10:30:31 +00:00
|
|
|
error: unused `async` for function with no await statements
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/unused_async.rs:12:5
|
2023-06-02 09:41:57 +00:00
|
|
|
|
|
|
|
|
LL | / async fn async_block_await() {
|
2023-08-24 19:32:12 +00:00
|
|
|
LL | |
|
2023-06-02 09:41:57 +00:00
|
|
|
LL | | async {
|
|
|
|
LL | | ready(()).await;
|
|
|
|
LL | | };
|
|
|
|
LL | | }
|
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
= help: consider removing the `async` from this function
|
|
|
|
note: `await` used in an async block, which does not require the enclosing function to be `async`
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/unused_async.rs:15:23
|
2023-06-02 09:41:57 +00:00
|
|
|
|
|
|
|
|
LL | ready(()).await;
|
|
|
|
| ^^^^^
|
|
|
|
= note: `-D clippy::unused-async` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::unused_async)]`
|
2023-06-02 09:41:57 +00:00
|
|
|
|
|
|
|
error: unused `async` for function with no await statements
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/unused_async.rs:45:5
|
2023-07-31 21:53:53 +00:00
|
|
|
|
|
|
|
|
LL | async fn f3() {}
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: consider removing the `async` from this function
|
|
|
|
|
|
|
|
error: unused `async` for function with no await statements
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/unused_async.rs:58:1
|
2021-05-20 10:30:31 +00:00
|
|
|
|
|
|
|
|
LL | / async fn foo() -> i32 {
|
2023-08-24 19:32:12 +00:00
|
|
|
LL | |
|
2021-05-20 10:30:31 +00:00
|
|
|
LL | | 4
|
|
|
|
LL | | }
|
|
|
|
| |_^
|
|
|
|
|
|
|
|
|
= help: consider removing the `async` from this function
|
|
|
|
|
2022-06-30 08:50:09 +00:00
|
|
|
error: unused `async` for function with no await statements
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/unused_async.rs:70:5
|
2022-06-30 08:50:09 +00:00
|
|
|
|
|
|
|
|
LL | / async fn unused(&self) -> i32 {
|
2023-08-24 19:32:12 +00:00
|
|
|
LL | |
|
2022-06-30 08:50:09 +00:00
|
|
|
LL | | 1
|
|
|
|
LL | | }
|
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
= help: consider removing the `async` from this function
|
|
|
|
|
2023-07-31 21:53:53 +00:00
|
|
|
error: aborting due to 4 previous errors
|
2021-05-20 10:30:31 +00:00
|
|
|
|