Skip to content

Commit 222aa62

Browse files
authored
Rollup merge of #69477 - Pulkit07:issue69298, r=cramertj
docs: add mention of async blocks in move keyword docs Fixes #69298
2 parents 0eb878d + 299a0d5 commit 222aa62

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

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)