]>
Commit | Line | Data |
---|---|---|
f035d41b | 1 | error[E0277]: `()` is not a future |
9ffffee4 | 2 | --> $DIR/async-error-span.rs:10:20 |
ba9703b0 XL |
3 | | |
4 | LL | fn get_future() -> impl Future<Output = ()> { | |
f035d41b | 5 | | ^^^^^^^^^^^^^^^^^^^^^^^^ `()` is not a future |
ba9703b0 | 6 | | |
1b1a35ee | 7 | = help: the trait `Future` is not implemented for `()` |
a2a8927a | 8 | = note: () must be a future or must implement `IntoFuture` to be awaited |
ba9703b0 | 9 | |
e74abb32 | 10 | error[E0698]: type inside `async fn` body must be known in this context |
9ffffee4 | 11 | --> $DIR/async-error-span.rs:16:9 |
416331ca XL |
12 | | |
13 | LL | let a; | |
14 | | ^ cannot infer type | |
15 | | | |
e74abb32 | 16 | note: the type is part of the `async fn` body because of this `await` |
49aad941 | 17 | --> $DIR/async-error-span.rs:19:18 |
416331ca XL |
18 | | |
19 | LL | get_future().await; | |
49aad941 | 20 | | ^^^^^ |
416331ca | 21 | |
ba9703b0 | 22 | error: aborting due to 2 previous errors |
416331ca | 23 | |
ba9703b0 XL |
24 | Some errors have detailed explanations: E0277, E0698. |
25 | For more information about an error, try `rustc --explain E0277`. |