2022-05-01 23:19:57 +00:00
|
|
|
error[E0277]: `()` is not a future
|
2023-04-25 18:59:16 +00:00
|
|
|
--> $DIR/issue-96555.rs:4:13
|
2022-05-01 23:19:57 +00:00
|
|
|
|
|
|
|
|
LL | m::f1().await;
|
2023-04-25 18:59:16 +00:00
|
|
|
| ------- ^^^^^ `()` is not a future
|
2022-05-01 23:19:57 +00:00
|
|
|
| |
|
|
|
|
| this call returns `()`
|
|
|
|
|
|
|
|
|
= help: the trait `Future` is not implemented for `()`
|
|
|
|
= note: () must be a future or must implement `IntoFuture` to be awaited
|
2022-08-15 20:31:37 +00:00
|
|
|
= note: required for `()` to implement `IntoFuture`
|
2022-05-01 23:19:57 +00:00
|
|
|
help: remove the `.await`
|
|
|
|
|
|
|
|
|
LL - m::f1().await;
|
|
|
|
LL + m::f1();
|
2022-06-08 17:34:57 +00:00
|
|
|
|
|
2022-05-01 23:19:57 +00:00
|
|
|
help: alternatively, consider making `fn f1` asynchronous
|
|
|
|
|
|
|
|
|
LL | pub async fn f1() {}
|
|
|
|
| +++++
|
|
|
|
|
|
|
|
error[E0277]: `()` is not a future
|
2023-04-25 18:59:16 +00:00
|
|
|
--> $DIR/issue-96555.rs:5:13
|
2022-05-01 23:19:57 +00:00
|
|
|
|
|
|
|
|
LL | m::f2().await;
|
2023-04-25 18:59:16 +00:00
|
|
|
| ------- ^^^^^ `()` is not a future
|
2022-05-01 23:19:57 +00:00
|
|
|
| |
|
|
|
|
| this call returns `()`
|
|
|
|
|
|
|
|
|
= help: the trait `Future` is not implemented for `()`
|
|
|
|
= note: () must be a future or must implement `IntoFuture` to be awaited
|
2022-08-15 20:31:37 +00:00
|
|
|
= note: required for `()` to implement `IntoFuture`
|
2022-05-01 23:19:57 +00:00
|
|
|
help: remove the `.await`
|
|
|
|
|
|
|
|
|
LL - m::f2().await;
|
|
|
|
LL + m::f2();
|
2022-06-08 17:34:57 +00:00
|
|
|
|
|
2022-05-01 23:19:57 +00:00
|
|
|
help: alternatively, consider making `fn f2` asynchronous
|
|
|
|
|
|
|
|
|
LL | pub(crate) async fn f2() {}
|
|
|
|
| +++++
|
|
|
|
|
|
|
|
error[E0277]: `()` is not a future
|
2023-04-25 18:59:16 +00:00
|
|
|
--> $DIR/issue-96555.rs:6:13
|
2022-05-01 23:19:57 +00:00
|
|
|
|
|
|
|
|
LL | m::f3().await;
|
2023-04-25 18:59:16 +00:00
|
|
|
| ------- ^^^^^ `()` is not a future
|
2022-05-01 23:19:57 +00:00
|
|
|
| |
|
|
|
|
| this call returns `()`
|
|
|
|
|
|
|
|
|
= help: the trait `Future` is not implemented for `()`
|
|
|
|
= note: () must be a future or must implement `IntoFuture` to be awaited
|
2022-08-15 20:31:37 +00:00
|
|
|
= note: required for `()` to implement `IntoFuture`
|
2022-05-01 23:19:57 +00:00
|
|
|
help: remove the `.await`
|
|
|
|
|
|
|
|
|
LL - m::f3().await;
|
|
|
|
LL + m::f3();
|
2022-06-08 17:34:57 +00:00
|
|
|
|
|
2022-05-01 23:19:57 +00:00
|
|
|
help: alternatively, consider making `fn f3` asynchronous
|
|
|
|
|
|
|
|
|
LL | pub async
|
|
|
|
| +++++
|
|
|
|
|
|
|
|
error: aborting due to 3 previous errors
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|