]> git.lizzy.rs Git - rust.git/blobdiff - src/libstd/keyword_docs.rs
Auto merge of #69482 - lqd:poloniusup, r=nikomatsakis
[rust.git] / src / libstd / keyword_docs.rs
index 58f4e76cd30b3d91285fdcf9655365e634be197e..3c69c1160d5b57088dbcec1aa18d91bba2190f6a 100644 (file)
@@ -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
 ///