]> git.lizzy.rs Git - rust.git/blob - tests/ui/async-await/async-error-span.stderr
Rollup merge of #107027 - GuillaumeGomez:rm-extra-removal, r=tmiasko
[rust.git] / tests / ui / async-await / async-error-span.stderr
1 error[E0277]: `()` is not a future
2   --> $DIR/async-error-span.rs:7:20
3    |
4 LL | fn get_future() -> impl Future<Output = ()> {
5    |                    ^^^^^^^^^^^^^^^^^^^^^^^^ `()` is not a future
6    |
7    = help: the trait `Future` is not implemented for `()`
8    = note: () must be a future or must implement `IntoFuture` to be awaited
9
10 error[E0698]: type inside `async fn` body must be known in this context
11   --> $DIR/async-error-span.rs:13:9
12    |
13 LL |     let a;
14    |         ^ cannot infer type
15    |
16 note: the type is part of the `async fn` body because of this `await`
17   --> $DIR/async-error-span.rs:14:17
18    |
19 LL |     get_future().await;
20    |                 ^^^^^^
21
22 error: aborting due to 2 previous errors
23
24 Some errors have detailed explanations: E0277, E0698.
25 For more information about an error, try `rustc --explain E0277`.