Skip to content

Commit 4806210

Browse files
committed
Auto merge of #26318 - steveklabnik:gh26268, r=alexcrichton
Fixes #26268
2 parents 00382a5 + 1792ef6 commit 4806210

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/doc/trpl/closures.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ let y = &mut num;
120120
```
121121

122122
If your closure requires it, however, Rust will take ownership and move
123-
the environment instead:
123+
the environment instead. This doesn’t work:
124124

125125
```rust,ignore
126126
let nums = vec![1, 2, 3];
@@ -130,7 +130,7 @@ let takes_nums = || nums;
130130
println!("{:?}", nums);
131131
```
132132

133-
This gives us:
133+
We get this error:
134134

135135
```text
136136
note: `nums` moved into closure environment here because it has type

0 commit comments

Comments
 (0)