TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Stabilizing async fn in traits in 2023

8 点作者 Jalad大约 2 年前

1 comment

royjacobs大约 2 年前
This is pretty cool, but at the same time it&#x27;s unfortunate to be reading things like &quot;one could simply write&quot; followed by &quot;hc: impl HealthCheck&lt;check(): Send&gt; + Send + &#x27;static&quot;.<p>I really enjoy writing Rust but I feel like a lot of things related to async just don&#x27;t map very cleanly to the rest of the language. Apart from the complicated type shenanigans in this post there are a lot of gotchas with async that result in panics at runtime instead of compilation errors. Basically, I don&#x27;t feel like Rust has my back when I&#x27;m writing async code.<p>Disclaimer: I am not a language designer so I have no clear idea how this could be solved, and I appreciate it&#x27;s a very difficult problem!
评论 #35813283 未加载