Skip to content

Commit

Permalink
Rollup merge of #32973 - kindlychung:patch-1, r=steveklabnik
Browse files Browse the repository at this point in the history
remove "#" symbols to make the code compile
  • Loading branch information
Manishearth committed Apr 15, 2016
2 parents 00d4ac3 + f916491 commit eba8055
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/doc/book/closures.md
Original file line number Diff line number Diff line change
Expand Up @@ -492,12 +492,12 @@ fn factory() -> Box<Fn(i32) -> i32> {

Box::new(move |x| x + num)
}
# fn main() {
fn main() {
let f = factory();

let answer = f(1);
assert_eq!(6, answer);
# }
}
```

By making the inner closure a `move Fn`, we create a new stack frame for our
Expand Down

0 comments on commit eba8055

Please sign in to comment.