We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4497196 commit 32fb252Copy full SHA for 32fb252
src/doc/book/closures.md
@@ -510,6 +510,7 @@ fn factory() -> Box<Fn(i32) -> i32> {
510
511
Box::new(|x| x + num)
512
}
513
+
514
# fn main() {
515
let f = factory();
516
@@ -540,12 +541,13 @@ fn factory() -> Box<Fn(i32) -> i32> {
540
541
542
Box::new(move |x| x + num)
543
-fn main() {
544
545
+# fn main() {
546
547
548
let answer = f(1);
549
assert_eq!(6, answer);
-}
550
+# }
551
```
552
553
By making the inner closure a `move Fn`, we create a new stack frame for our
0 commit comments