]>
Commit | Line | Data |
---|---|---|
a2a8927a XL |
1 | error[E0277]: `()` is not a future |
2 | --> $DIR/unnecessary-await.rs:9:10 | |
3 | | | |
4 | LL | boo().await; | |
5 | | -----^^^^^^ `()` is not a future | |
6 | | | | |
7 | | this call returns `()` | |
8 | | | |
9 | = help: the trait `Future` is not implemented for `()` | |
10 | = note: () must be a future or must implement `IntoFuture` to be awaited | |
f2b60f7d | 11 | = note: required for `()` to implement `IntoFuture` |
a2a8927a XL |
12 | help: remove the `.await` |
13 | | | |
14 | LL - boo().await; | |
15 | LL + boo(); | |
923072b8 | 16 | | |
a2a8927a XL |
17 | help: alternatively, consider making `fn boo` asynchronous |
18 | | | |
19 | LL | async fn boo() {} | |
20 | | +++++ | |
21 | ||
22 | error: aborting due to previous error | |
23 | ||
24 | For more information about this error, try `rustc --explain E0277`. |