2021-05-20 05:30:31 -05:00
|
|
|
error: unused `async` for function with no await statements
|
2023-07-02 07:35:19 -05:00
|
|
|
--> $DIR/unused_async.rs:13:5
|
2023-06-02 04:41:57 -05:00
|
|
|
|
|
|
|
|
LL | / async fn async_block_await() {
|
|
|
|
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`
|
2023-07-02 07:35:19 -05:00
|
|
|
--> $DIR/unused_async.rs:15:23
|
2023-06-02 04:41:57 -05:00
|
|
|
|
|
|
|
|
LL | ready(()).await;
|
|
|
|
| ^^^^^
|
|
|
|
= note: `-D clippy::unused-async` implied by `-D warnings`
|
|
|
|
|
|
|
|
error: unused `async` for function with no await statements
|
2023-07-02 07:35:19 -05:00
|
|
|
--> $DIR/unused_async.rs:40:1
|
2021-05-20 05:30:31 -05:00
|
|
|
|
|
|
|
|
LL | / async fn foo() -> i32 {
|
|
|
|
LL | | 4
|
|
|
|
LL | | }
|
|
|
|
| |_^
|
|
|
|
|
|
|
|
|
= help: consider removing the `async` from this function
|
|
|
|
|
2022-06-30 03:50:09 -05:00
|
|
|
error: unused `async` for function with no await statements
|
2023-07-02 07:35:19 -05:00
|
|
|
--> $DIR/unused_async.rs:51:5
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
|
LL | / async fn unused(&self) -> i32 {
|
|
|
|
LL | | 1
|
|
|
|
LL | | }
|
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
= help: consider removing the `async` from this function
|
|
|
|
|
2023-06-02 04:41:57 -05:00
|
|
|
error: aborting due to 3 previous errors
|
2021-05-20 05:30:31 -05:00
|
|
|
|