Skip to content

Commit 3a2aa09

Browse files
tmandryeholk
andauthored
Don't let our dreams be dreams
Co-authored-by: Eric Holk <eric@theincredibleholk.org>
1 parent 3943e20 commit 3a2aa09

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ In the MVP, traits that use async functions are not "dyn safe", meaning that the
169169

170170
At first, this seems like a crucial limitation, since many of the use cases require dynamic dispatch! But it turns out that there is a workaround. One can define an "erased" trait internally to your crate that enables dynamic dispatch. The process was pioneered by crates like [erased serde] and is explained in detail in the [builder-provider case study].
171171

172-
To make this workaround easier in the near term, we hope to provide a proc macro to automate it. In the future, async fn [should work][ugf-dyn] with `dyn Trait` directly.
172+
To make this workaround easier in the near term, we plan to provide a proc macro to automate it. In the future, async fn [should work][ugf-dyn] with `dyn Trait` directly.
173173

174174
[erased serde]: https://github.com/dtolnay/erased-serde
175175
[builder-provider case study]: https://rust-lang.github.io/async-fundamentals-initiative/evaluation/case-studies/builder-provider-api.html#dynamic-dispatch-behind-the-api

0 commit comments

Comments
 (0)