Skip to content

Commit

Permalink
docs: add mention of async blocks in move keyword docs
Browse files Browse the repository at this point in the history
Fixes #69298
  • Loading branch information
Pulkit07 committed Feb 28, 2020
1 parent 46f5aa9 commit 299a0d5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/libstd/keyword_docs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
///
Expand Down

0 comments on commit 299a0d5

Please sign in to comment.