mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-11 16:15:03 +00:00
Rollup merge of #32973 - kindlychung:patch-1, r=steveklabnik
remove "#" symbols to make the code compile
This commit is contained in:
commit
eba80558d7
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user