Skip to content

Commit 299a0d5

Browse files
committed
docs: add mention of async blocks in move keyword docs
Fixes #69298
1 parent 46f5aa9 commit 299a0d5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Diff for: src/libstd/keyword_docs.rs

+9
Original file line numberDiff line numberDiff line change
@@ -895,6 +895,15 @@ mod mod_keyword {}
895895
/// // x is no longer available
896896
/// ```
897897
///
898+
/// `move` is also valid before an async block.
899+
///
900+
/// ```rust
901+
/// let capture = "hello";
902+
/// let block = async move {
903+
/// println!("rust says {} from async block", capture);
904+
/// };
905+
/// ```
906+
///
898907
/// For more information on the `move` keyword, see the [closure]'s section
899908
/// of the Rust book or the [threads] section
900909
///

0 commit comments

Comments
 (0)