Skip to content

Commit d4eebe0

Browse files
Apply suggestions from code review
Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>
1 parent 0e960bf commit d4eebe0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

posts/inside-rust/2023-05-02-stabilizing-async-fn-in-trait.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ As of now, all of the functionality described in this blog post is implemented a
1515

1616
## MVP Part 1: Core support for "async functions in traits"
1717

18-
The easiest way to explain what we are going to stabilize is to use a code example. To start, we will permit the use of `async fn` in traits definitions...
18+
The easiest way to explain what we are going to stabilize is to use a code example. To start, we will permit the use of `async fn` in trait definitions...
1919

2020
```rust
2121
trait HealthCheck {
@@ -84,7 +84,7 @@ where
8484
}
8585
```
8686

87-
Of course, it's kind of unfortunate that we had to rewrite from taking an `impl HealthCheck` to an explicit `HC` type parameter in order to use this notation. RFC #2289, "associated type bounds", introduced a compact notation to address this problem. That RFC is not part of this MVP, but if it were stabilized, then one could simply write:
87+
Of course, it's kind of unfortunate that we had to rewrite from taking an `impl HealthCheck` to an explicit `HC` type parameter in order to use this notation. [RFC 2289](https://github.com/rust-lang/rfcs/pull/2289), "associated type bounds", introduced a compact notation to address this problem. That RFC is not part of this MVP, but if it were stabilized, then one could simply write:
8888

8989
```rust
9090
async fn do_health_check_par(hc: impl HealthCheck<check(): Send> + Send + 'static) {

0 commit comments

Comments
 (0)