Skip to content

Commit 01d542f

Browse files
authored
Merge pull request rust-lang#3341 from rust-lang/spastorino-patch-2
async fns desugared version is async move
2 parents 2c5b2e3 + 84e0f89 commit 01d542f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

text/3185-static-async-fn-in-trait.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Note that if a function in a trait is written as an `async fn`, it must also be
4949
```rust
5050
impl Service for MyService {
5151
fn request(&self, key: i32) -> impl Future<Output = Response> {
52-
async {
52+
async move {
5353
...
5454
}
5555
}
@@ -71,7 +71,7 @@ impl Service for MyService {
7171
where
7272
Self: 'a;
7373
fn request<'a>(&'a self, key: i32) -> RequestFut<'a> {
74-
async { ... }
74+
async move { ... }
7575
}
7676
}
7777
```

0 commit comments

Comments
 (0)