# A final proposal for await syntax

**URL:** <https://internals.rust-lang.org/t/a-final-proposal-for-await-syntax/10021>\
**Category:** language design\
**Created:** [May 6, 2019, 2:36pm UTC](https://internals.rust-lang.org/t/a-final-proposal-for-await-syntax/10021 "2019-05-06T14:36:19Z")\
**Posts on this page:** 1\
**Showing post:** 188

<div class="post-metadata">

**Author:** ![Nemo157](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/nemo157/32/11585_2.png) [@Nemo157](https://internals.rust-lang.org/u/Nemo157)\
**Post date:** [May 11, 2019, 9:42am UTC](https://internals.rust-lang.org/t/a-final-proposal-for-await-syntax/10021/188 "2019-05-11T09:42:34Z")

</div>

> [@tkaitchuck](#):
>
> One thing I haven’t seen answered is how this plays in patterns. For example, is this valid syntax:

No, `await` is only an operator that applies in an _expression_. There have been mentions of an `await` pattern related to @withoutboats posts on for loops, but there have been no serious proposals of adding them yet

> [@tkaitchuck](#):
>
> WithoutBoats indicated the Postfix syntax might not play well with for loops.

See [this later comment](https://internals.rust-lang.org/t/await-syntax-discussion-summary/9914/205). (One of the ideas that I think I've seen is that if `for` loops can be generalised to streaming iterators with GATs then we can have a trivial transform of `Stream<Item = T>` -\> `StreamingIterator<Item: Future<Output = T>>` and use that directly in a `for` loop).

---

_[View the full topic](https://internals.rust-lang.org/t/a-final-proposal-for-await-syntax/10021)._
