Skip to content

Commit 5486213

Browse files
Add extra note about ergonomics
Co-authored-by: Niko Matsakis <niko@alum.mit.edu>
1 parent 07c4627 commit 5486213

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ async fn do_health_check_par(hc: impl HealthCheck<check(): Send> + Send + 'stati
9999
}
100100
```
101101

102-
In our [previous post][pp], we [hypothesized](https://blog.rust-lang.org/inside-rust/2022/11/17/async-fn-in-trait-nightly.html#hypothesis-this-is-uncommon) that this problem might not occur often in practice. However, our case studies found that it comes up quite frequently, and so we decided that a solution is needed. We explored a number of solutions and concluded that associated return types are the most practical.
102+
In our [previous post][pp], we [hypothesized](https://blog.rust-lang.org/inside-rust/2022/11/17/async-fn-in-trait-nightly.html#hypothesis-this-is-uncommon) that this problem might not occur often in practice. However, our case studies found that it comes up quite frequently, and so we decided that a solution is needed. We explored a number of solutions and concluded that associated return types (ARTs) are a flexible and reasonably ergonomic building block, which makes them a good fit for an MVP. However, we also found that in traits with many methods, ARTs become verbose. As discussed later in the post, we expect to ship a proc-macro that can help workaround this in the short term while we gain experience.
103103

104104
**Status:** Associated return types have an experimental implementation and we are currently drafting an RFC. There are several open bugs that will need to be fixed. We are considering more concise syntax for the future (see below).
105105

0 commit comments

Comments
 (0)