diff options
| author | bors <bors@rust-lang.org> | 2015-06-16 08:20:57 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-06-16 08:20:57 +0000 |
| commit | 4806210db9148f008a317db5235bc0e5a5e3b48e (patch) | |
| tree | 2e69ff15c47c70bb4775254bc918da48899506f9 /src | |
| parent | 00382a592baa293776b7601155dd50d3ab2c588c (diff) | |
| parent | 1792ef6ae4f51a45b157c69c5e34e0b48770dd56 (diff) | |
| download | rust-4806210db9148f008a317db5235bc0e5a5e3b48e.tar.gz rust-4806210db9148f008a317db5235bc0e5a5e3b48e.zip | |
Auto merge of #26318 - steveklabnik:gh26268, r=alexcrichton
Fixes #26268
Diffstat (limited to 'src')
| -rw-r--r-- | src/doc/trpl/closures.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/doc/trpl/closures.md b/src/doc/trpl/closures.md index 428897821cf..ce52ea5d690 100644 --- a/src/doc/trpl/closures.md +++ b/src/doc/trpl/closures.md @@ -120,7 +120,7 @@ let y = &mut num; ``` If your closure requires it, however, Rust will take ownership and move -the environment instead: +the environment instead. This doesn’t work: ```rust,ignore let nums = vec![1, 2, 3]; @@ -130,7 +130,7 @@ let takes_nums = || nums; println!("{:?}", nums); ``` -This gives us: +We get this error: ```text note: `nums` moved into closure environment here because it has type |
