{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreiax2enaunn4st2qotnsmywujv2czk3ww6zjqjicvfy45qqgoy774u",
    "uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3mkvfi33zjtx2"
  },
  "path": "/t/discussion-alternative-syntax-for-async-iteration-for-async-i-in-stream/24218#post_2",
  "publishedAt": "2026-05-02T17:52:35.000Z",
  "site": "https://internals.rust-lang.org",
  "textContent": "The `await` in `for await` is trying to suggest a very specific meaning: \"there is a suspension point here, unwrapping a future (and possibly pausing execution)\". Similarly, the `async` in `async fn` and the hypothetical `async let` [sic; a reference to a Swift feature rather than destructuring] has the opposite meaning: \"there's an implicit `async` block here, wrapping computation into a future\".\n\n`for async` would make sense to me if you still have to `i.await` in the body of the loop…but if that were the case, how would the loop ever know when to terminate? Either _something_ has to be awaited before the body begins, or the signature of `next` would need to be `Option<Future<…>>` rather than `Future<Option<…>>`, which would be less useful. So I think `for await` remains the correct choice.",
  "title": "[Discussion] Alternative syntax for async iteration: `for async i in stream`?"
}