We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 073a09f commit f916491Copy full SHA for f916491
src/doc/book/closures.md
@@ -492,12 +492,12 @@ fn factory() -> Box<Fn(i32) -> i32> {
492
493
Box::new(move |x| x + num)
494
}
495
-# fn main() {
+fn main() {
496
let f = factory();
497
498
let answer = f(1);
499
assert_eq!(6, answer);
500
-# }
+}
501
```
502
503
By making the inner closure a `move Fn`, we create a new stack frame for our
0 commit comments