We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dce794c commit 1b44947Copy full SHA for 1b44947
src/expressions/await-expr.md
@@ -52,12 +52,13 @@ Effectively, an `<expr>.await` expression is roughly
52
equivalent to the following (this desugaring is not normative):
53
54
```rust,ignore
55
-let future = /* <expr> */;
56
-loop {
57
- let mut pin = unsafe { Pin::new_unchecked(&mut future) };
58
- match Pin::future::poll(Pin::borrow(&mut pin), &mut current_context) {
59
- Poll::Ready(r) => break r,
60
- Poll::Pending => yield Poll::Pending,
+match /* <expr> */ {
+ mut pinned => loop {
+ let mut pin = unsafe { Pin::new_unchecked(&mut pinned) };
+ match Pin::future::poll(Pin::borrow(&mut pin), &mut current_context) {
+ Poll::Ready(r) => break r,
+ Poll::Pending => yield Poll::Pending,
61
+ }
62
}
63
64
```
0 commit comments