File tree Expand file tree Collapse file tree 5 files changed +8
-8
lines changed Expand file tree Collapse file tree 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 {
14041404 f. write_str ( match self {
14051405 AsyncGeneratorKind :: Block => "`async` block" ,
14061406 AsyncGeneratorKind :: Closure => "`async` closure body" ,
1407- AsyncGeneratorKind :: Fn => "`async` fn body" ,
1407+ AsyncGeneratorKind :: Fn => "`async fn` body" ,
14081408 } )
14091409 }
14101410}
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ fn get_future() -> impl Future<Output = ()> {
99}
1010
1111async 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
1313 get_future ( ) . await ;
1414}
1515
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
22 --> $DIR/async-error-span.rs:12:9
33 |
44LL | let a;
55 | ^ cannot infer type
66 |
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`
88 --> $DIR/async-error-span.rs:13:5
99 |
1010LL | get_future().await;
Original file line number Diff line number Diff line change @@ -7,9 +7,9 @@ async fn bar<T>() -> () {}
77
88async fn foo ( ) {
99 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
1111 //~| 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`
1313 //~| NOTE in this expansion of desugaring of `await`
1414}
1515fn 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
22 --> $DIR/unresolved_type_param.rs:9:5
33 |
44LL | bar().await;
55 | ^^^ cannot infer type for `T`
66 |
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`
88 --> $DIR/unresolved_type_param.rs:9:5
99 |
1010LL | bar().await;
You can’t perform that action at this time.
0 commit comments