Skip to content

Commit

Permalink
s/async fn/async fn/
Browse files Browse the repository at this point in the history
  • Loading branch information
nikomatsakis committed Oct 2, 2019
1 parent 5fea1d2 commit 3f277e1
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/librustc/hir/mod.rs
Expand Up @@ -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",
})
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/async-await/async-error-span.rs
Expand Up @@ -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;
}

Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/async-await/async-error-span.stderr
@@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/async-await/unresolved_type_param.rs
Expand Up @@ -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() {}
4 changes: 2 additions & 2 deletions src/test/ui/async-await/unresolved_type_param.stderr
@@ -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;
Expand Down

0 comments on commit 3f277e1

Please sign in to comment.