diff options
| author | Pulkit Goyal <7895pulkit@gmail.com> | 2020-02-26 14:00:35 +0530 |
|---|---|---|
| committer | Pulkit Goyal <7895pulkit@gmail.com> | 2020-02-28 16:47:29 +0530 |
| commit | 299a0d559f574f1ca1092a3783f00adba68be290 (patch) | |
| tree | 2a5c19017e47c4ebd09db3914317866a88986d38 /src/libstd | |
| parent | 46f5aa93d47e9077775ad9038970fd4c77abaad7 (diff) | |
| download | rust-299a0d559f574f1ca1092a3783f00adba68be290.tar.gz rust-299a0d559f574f1ca1092a3783f00adba68be290.zip | |
docs: add mention of async blocks in move keyword docs
Fixes #69298
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/keyword_docs.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libstd/keyword_docs.rs b/src/libstd/keyword_docs.rs index 58f4e76cd30..3c69c1160d5 100644 --- a/src/libstd/keyword_docs.rs +++ b/src/libstd/keyword_docs.rs @@ -895,6 +895,15 @@ mod mod_keyword {} /// // x is no longer available /// ``` /// +/// `move` is also valid before an async block. +/// +/// ```rust +/// let capture = "hello"; +/// let block = async move { +/// println!("rust says {} from async block", capture); +/// }; +/// ``` +/// /// For more information on the `move` keyword, see the [closure]'s section /// of the Rust book or the [threads] section /// |
