fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0277]: `()` is not a future 2 --> $DIR/issue-96555.rs:4:13 3 | 4LL | m::f1().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` 12help: remove the `.await` 13 | 14LL - m::f1().await; 15LL + m::f1(); 16 | 17help: alternatively, consider making `fn f1` asynchronous 18 | 19LL | pub async fn f1() {} 20 | +++++ 21 22error[E0277]: `()` is not a future 23 --> $DIR/issue-96555.rs:5:13 24 | 25LL | m::f2().await; 26 | ------- ^^^^^ `()` is not a future 27 | | 28 | this call returns `()` 29 | 30 = help: the trait `Future` is not implemented for `()` 31 = note: () must be a future or must implement `IntoFuture` to be awaited 32 = note: required for `()` to implement `IntoFuture` 33help: remove the `.await` 34 | 35LL - m::f2().await; 36LL + m::f2(); 37 | 38help: alternatively, consider making `fn f2` asynchronous 39 | 40LL | pub(crate) async fn f2() {} 41 | +++++ 42 43error[E0277]: `()` is not a future 44 --> $DIR/issue-96555.rs:6:13 45 | 46LL | m::f3().await; 47 | ------- ^^^^^ `()` is not a future 48 | | 49 | this call returns `()` 50 | 51 = help: the trait `Future` is not implemented for `()` 52 = note: () must be a future or must implement `IntoFuture` to be awaited 53 = note: required for `()` to implement `IntoFuture` 54help: remove the `.await` 55 | 56LL - m::f3().await; 57LL + m::f3(); 58 | 59help: alternatively, consider making `fn f3` asynchronous 60 | 61LL | pub async 62 | +++++ 63 64error: aborting due to 3 previous errors 65 66For more information about this error, try `rustc --explain E0277`.