Skip to content
Permalink
Browse files

s/`async` fn/`async fn`/

  • Loading branch information...
nikomatsakis committed Oct 2, 2019
1 parent 5fea1d2 commit 3f277e1a66f0e8de9cc46c9a886b4ad0f4582944
@@ -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;

0 comments on commit 3f277e1

Please sign in to comment.
You can’t perform that action at this time.