]> git.lizzy.rs Git - rust.git/blob - tests/ui/async-await/unnecessary-await.stderr
Rollup merge of #106973 - oli-obk:tait_ice_closure_in_impl_header, r=lcnr
[rust.git] / tests / ui / async-await / unnecessary-await.stderr
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
11    = note: required for `()` to implement `IntoFuture`
12 help: remove the `.await`
13    |
14 LL -     boo().await;
15 LL +     boo();
16    |
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`.