blob: adb44d7a62ef41dcdcf4e7ce5412d57a10d28c8a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
error: this async expression only awaits a single future
--> $DIR/redundant_async_block.rs:13:13
|
LL | let x = async { f.await };
| ^^^^^^^^^^^^^^^^^ help: you can reduce it to: `f`
|
= note: `-D clippy::redundant-async-block` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::redundant_async_block)]`
error: this async expression only awaits a single future
--> $DIR/redundant_async_block.rs:20:16
|
LL | let fut2 = async { fut1.await };
| ^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `fut1`
error: this async expression only awaits a single future
--> $DIR/redundant_async_block.rs:24:16
|
LL | let fut2 = async move { fut1.await };
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `fut1`
error: this async expression only awaits a single future
--> $DIR/redundant_async_block.rs:27:15
|
LL | let fut = async { async { 42 }.await };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `async { 42 }`
error: this async expression only awaits a single future
--> $DIR/redundant_async_block.rs:43:5
|
LL | async move { fut.await }
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `fut`
error: this async expression only awaits a single future
--> $DIR/redundant_async_block.rs:56:5
|
LL | async move { fut.await }
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `fut`
error: this async expression only awaits a single future
--> $DIR/redundant_async_block.rs:61:5
|
LL | async { f.await }
| ^^^^^^^^^^^^^^^^^ help: you can reduce it to: `f`
error: this async expression only awaits a single future
--> $DIR/redundant_async_block.rs:84:5
|
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
--> $DIR/redundant_async_block.rs:147:13
|
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
--> $DIR/redundant_async_block.rs:167:13
|
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
|