s/async
fn/async fn
/
This commit is contained in:
parent
5fea1d279b
commit
3f277e1a66
5 changed files with 8 additions and 8 deletions
|
@ -1404,7 +1404,7 @@ impl fmt::Display for AsyncGeneratorKind {
|
|||
f.write_str(match self {
|
||||
AsyncGeneratorKind::Block => "`async` block",
|
||||
AsyncGeneratorKind::Closure => "`async` closure body",
|
||||
AsyncGeneratorKind::Fn => "`async` fn body",
|
||||
AsyncGeneratorKind::Fn => "`async fn` body",
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ fn get_future() -> impl Future<Output = ()> {
|
|||
}
|
||||
|
||||
async fn foo() {
|
||||
let a; //~ ERROR type inside `async` fn body must be known in this context
|
||||
let a; //~ ERROR type inside `async fn` body must be known in this context
|
||||
get_future().await;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
error[E0698]: type inside `async` fn body must be known in this context
|
||||
error[E0698]: type inside `async fn` body must be known in this context
|
||||
--> $DIR/async-error-span.rs:12:9
|
||||
|
|
||||
LL | let a;
|
||||
| ^ cannot infer type
|
||||
|
|
||||
note: the type is part of the `async` fn body because of this `await`
|
||||
note: the type is part of the `async fn` body because of this `await`
|
||||
--> $DIR/async-error-span.rs:13:5
|
||||
|
|
||||
LL | get_future().await;
|
||||
|
|
|
@ -7,9 +7,9 @@ async fn bar<T>() -> () {}
|
|||
|
||||
async fn foo() {
|
||||
bar().await;
|
||||
//~^ ERROR type inside `async` fn body must be known in this context
|
||||
//~^ ERROR type inside `async fn` body must be known in this context
|
||||
//~| NOTE cannot infer type for `T`
|
||||
//~| NOTE the type is part of the `async` fn body because of this `await`
|
||||
//~| NOTE the type is part of the `async fn` body because of this `await`
|
||||
//~| NOTE in this expansion of desugaring of `await`
|
||||
}
|
||||
fn main() {}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
error[E0698]: type inside `async` fn body must be known in this context
|
||||
error[E0698]: type inside `async fn` body must be known in this context
|
||||
--> $DIR/unresolved_type_param.rs:9:5
|
||||
|
|
||||
LL | bar().await;
|
||||
| ^^^ cannot infer type for `T`
|
||||
|
|
||||
note: the type is part of the `async` fn body because of this `await`
|
||||
note: the type is part of the `async fn` body because of this `await`
|
||||
--> $DIR/unresolved_type_param.rs:9:5
|
||||
|
|
||||
LL | bar().await;
|
||||
|
|
Loading…
Add table
Reference in a new issue