2023-03-10 03:53:50 -06:00
|
|
|
error: this async expression only awaits a single future
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/redundant_async_block.rs:13:13
|
2023-03-10 03:53:50 -06:00
|
|
|
|
|
|
|
|
LL | let x = async { f.await };
|
|
|
|
| ^^^^^^^^^^^^^^^^^ help: you can reduce it to: `f`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::redundant-async-block` implied by `-D warnings`
|
2023-08-01 07:02:21 -05:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::redundant_async_block)]`
|
2023-03-10 03:53:50 -06:00
|
|
|
|
|
|
|
error: this async expression only awaits a single future
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/redundant_async_block.rs:20:16
|
2023-03-10 03:53:50 -06:00
|
|
|
|
|
|
|
|
LL | let fut2 = async { fut1.await };
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `fut1`
|
|
|
|
|
|
|
|
error: this async expression only awaits a single future
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/redundant_async_block.rs:24:16
|
2023-03-10 03:53:50 -06:00
|
|
|
|
|
|
|
|
LL | let fut2 = async move { fut1.await };
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `fut1`
|
|
|
|
|
|
|
|
error: this async expression only awaits a single future
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/redundant_async_block.rs:27:15
|
2023-03-10 03:53:50 -06:00
|
|
|
|
|
|
|
|
LL | let fut = async { async { 42 }.await };
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `async { 42 }`
|
|
|
|
|
2023-03-24 08:04:35 -05:00
|
|
|
error: this async expression only awaits a single future
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/redundant_async_block.rs:43:5
|
2023-03-24 08:04:35 -05:00
|
|
|
|
|
|
|
|
LL | async move { fut.await }
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `fut`
|
|
|
|
|
|
|
|
error: this async expression only awaits a single future
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/redundant_async_block.rs:56:5
|
2023-03-24 08:04:35 -05:00
|
|
|
|
|
|
|
|
LL | async move { fut.await }
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `fut`
|
|
|
|
|
2023-04-11 08:31:08 -05:00
|
|
|
error: this async expression only awaits a single future
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/redundant_async_block.rs:61:5
|
2023-04-11 08:31:08 -05:00
|
|
|
|
|
|
|
|
LL | async { f.await }
|
|
|
|
| ^^^^^^^^^^^^^^^^^ help: you can reduce it to: `f`
|
|
|
|
|
|
|
|
error: this async expression only awaits a single future
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/redundant_async_block.rs:84:5
|
2023-04-11 08:31:08 -05:00
|
|
|
|
|
|
|
|
LL | async { async { f().await + 1 }.await }
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `async { f().await + 1 }`
|
|
|
|
|
|
|
|
error: this async expression only awaits a single future
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/redundant_async_block.rs:147:13
|
2023-04-11 08:31:08 -05:00
|
|
|
|
|
|
|
|
LL | async { async { 42 }.await }
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `async { 42 }`
|
|
|
|
...
|
|
|
|
LL | mac!()
|
|
|
|
| ------ in this macro invocation
|
|
|
|
|
|
|
|
|
= note: this error originates in the macro `mac` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
|
|
|
|
error: this async expression only awaits a single future
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/redundant_async_block.rs:167:13
|
2023-04-11 08:31:08 -05:00
|
|
|
|
|
|
|
|
LL | async { async { $e }.await }
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `async { $e }`
|
|
|
|
...
|
|
|
|
LL | mac!(42)
|
|
|
|
| -------- in this macro invocation
|
|
|
|
|
|
|
|
|
= note: this error originates in the macro `mac` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
|
|
|
|
error: aborting due to 10 previous errors
|
2023-03-10 03:53:50 -06:00
|
|
|
|