File tree 5 files changed +8
-8
lines changed 5 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -1404,7 +1404,7 @@ impl fmt::Display for AsyncGeneratorKind {
1404
1404
f. write_str ( match self {
1405
1405
AsyncGeneratorKind :: Block => "`async` block" ,
1406
1406
AsyncGeneratorKind :: Closure => "`async` closure body" ,
1407
- AsyncGeneratorKind :: Fn => "`async` fn body" ,
1407
+ AsyncGeneratorKind :: Fn => "`async fn` body" ,
1408
1408
} )
1409
1409
}
1410
1410
}
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ fn get_future() -> impl Future<Output = ()> {
9
9
}
10
10
11
11
async fn foo ( ) {
12
- let a; //~ ERROR type inside `async` fn body must be known in this context
12
+ let a; //~ ERROR type inside `async fn` body must be known in this context
13
13
get_future ( ) . await ;
14
14
}
15
15
Original file line number Diff line number Diff line change 1
- error[E0698]: type inside `async` fn body must be known in this context
1
+ error[E0698]: type inside `async fn` body must be known in this context
2
2
--> $DIR/async-error-span.rs:12:9
3
3
|
4
4
LL | let a;
5
5
| ^ cannot infer type
6
6
|
7
- note: the type is part of the `async` fn body because of this `await`
7
+ note: the type is part of the `async fn` body because of this `await`
8
8
--> $DIR/async-error-span.rs:13:5
9
9
|
10
10
LL | get_future().await;
Original file line number Diff line number Diff line change @@ -7,9 +7,9 @@ async fn bar<T>() -> () {}
7
7
8
8
async fn foo ( ) {
9
9
bar ( ) . await ;
10
- //~^ ERROR type inside `async` fn body must be known in this context
10
+ //~^ ERROR type inside `async fn` body must be known in this context
11
11
//~| NOTE cannot infer type for `T`
12
- //~| NOTE the type is part of the `async` fn body because of this `await`
12
+ //~| NOTE the type is part of the `async fn` body because of this `await`
13
13
//~| NOTE in this expansion of desugaring of `await`
14
14
}
15
15
fn main ( ) { }
Original file line number Diff line number Diff line change 1
- error[E0698]: type inside `async` fn body must be known in this context
1
+ error[E0698]: type inside `async fn` body must be known in this context
2
2
--> $DIR/unresolved_type_param.rs:9:5
3
3
|
4
4
LL | bar().await;
5
5
| ^^^ cannot infer type for `T`
6
6
|
7
- note: the type is part of the `async` fn body because of this `await`
7
+ note: the type is part of the `async fn` body because of this `await`
8
8
--> $DIR/unresolved_type_param.rs:9:5
9
9
|
10
10
LL | bar().await;
You can’t perform that action at this time.
0 commit comments