blob: 3041cf65789389dda829483a406ed00df692d63a (
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
|
error: an async construct yields a type which is itself awaitable
--> tests/ui/async_yields_async.rs:37:9
|
LL | let _h = async {
| _____________________-
LL | |/ async {
LL | || 3
LL | || }
| ||_________^ awaitable value not awaited
LL | | };
| |______- outer async construct
|
= note: `-D clippy::async-yields-async` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::async_yields_async)]`
help: consider awaiting this value
|
LL | async {
LL | 3
LL ~ }.await
|
error: an async construct yields a type which is itself awaitable
--> tests/ui/async_yields_async.rs:43:9
|
LL | let _i = async {
| ____________________-
LL | | CustomFutureType
| | ^^^^^^^^^^^^^^^^
| | |
| | awaitable value not awaited
| | help: consider awaiting this value: `CustomFutureType.await`
LL | | };
| |_____- outer async construct
error: an async construct yields a type which is itself awaitable
--> tests/ui/async_yields_async.rs:50:9
|
LL | let _j = async || {
| ________________________-
LL | |/ async {
LL | || 3
LL | || }
| ||_________^ awaitable value not awaited
LL | | };
| |______- outer async construct
|
help: consider awaiting this value
|
LL | async {
LL | 3
LL ~ }.await
|
error: an async construct yields a type which is itself awaitable
--> tests/ui/async_yields_async.rs:56:9
|
LL | let _k = async || {
| _______________________-
LL | | CustomFutureType
| | ^^^^^^^^^^^^^^^^
| | |
| | awaitable value not awaited
| | help: consider awaiting this value: `CustomFutureType.await`
LL | | };
| |_____- outer async construct
error: an async construct yields a type which is itself awaitable
--> tests/ui/async_yields_async.rs:59:23
|
LL | let _l = async || CustomFutureType;
| ^^^^^^^^^^^^^^^^
| |
| outer async construct
| awaitable value not awaited
| help: consider awaiting this value: `CustomFutureType.await`
error: an async construct yields a type which is itself awaitable
--> tests/ui/async_yields_async.rs:66:9
|
LL | let _m = async || {
| _______________________-
LL | | println!("I'm bored");
... |
LL | | CustomFutureType
| | ^^^^^^^^^^^^^^^^
| | |
| | awaitable value not awaited
| | help: consider awaiting this value: `CustomFutureType.await`
LL | | };
| |_____- outer async construct
error: an async construct yields a type which is itself awaitable
--> tests/ui/async_yields_async.rs:96:21
|
LL | let x = async { call_bar!(5) };
| --^^^^^^^^^^^^--
| | |
| | awaitable value not awaited
| | help: consider awaiting this value: `call_bar!(5).await`
| outer async construct
error: an async construct yields a type which is itself awaitable
--> tests/ui/async_yields_async.rs:98:21
|
LL | let y = async { call_bar!() };
| --^^^^^^^^^^^--
| | |
| | awaitable value not awaited
| | help: consider awaiting this value: `call_bar!().await`
| outer async construct
error: an async construct yields a type which is itself awaitable
--> tests/ui/async_yields_async.rs:90:21
|
LL | async { bar(5) }
| --^^^^^^--
| | |
| | awaitable value not awaited
| | help: consider awaiting this value: `bar(5).await`
| outer async construct
...
LL | let y = async { call_bar!() };
| ----------- in this macro invocation
|
= note: this error originates in the macro `call_bar` (in Nightly builds, run with -Z macro-backtrace for more info)
error: an async construct yields a type which is itself awaitable
--> tests/ui/async_yields_async.rs:119:21
|
LL | let _ = async { CustomFutureType + CustomFutureType };
| --^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^--
| | |
| | awaitable value not awaited
| | help: consider awaiting this value: `(CustomFutureType + CustomFutureType).await`
| outer async construct
error: aborting due to 10 previous errors
|