File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 5
5
use std:: future:: Future ;
6
6
7
7
fn get_future ( ) -> impl Future < Output = ( ) > {
8
- panic ! ( ) //~^ ERROR `()` is not a future
8
+ //~^ ERROR `()` is not a future
9
+ panic ! ( )
9
10
}
10
11
11
12
async fn foo ( ) {
Original file line number Diff line number Diff line change @@ -8,13 +8,13 @@ LL | fn get_future() -> impl Future<Output = ()> {
8
8
= note: () must be a future or must implement `IntoFuture` to be awaited
9
9
10
10
error[E0698]: type inside `async fn` body must be known in this context
11
- --> $DIR/async-error-span.rs:12 :9
11
+ --> $DIR/async-error-span.rs:13 :9
12
12
|
13
13
LL | let a;
14
14
| ^ cannot infer type
15
15
|
16
16
note: the type is part of the `async fn` body because of this `await`
17
- --> $DIR/async-error-span.rs:13 :17
17
+ --> $DIR/async-error-span.rs:14 :17
18
18
|
19
19
LL | get_future().await;
20
20
| ^^^^^^
You can’t perform that action at this time.
0 commit comments