Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

remove "#" symbols to make the code compile #32973

Merged
merged 1 commit into from
Apr 16, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/doc/book/closures.md
Original file line number Diff line number Diff line change
@@ -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);
# }
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry to comment when this was already approved, but it'd read nicer better the main function's body was indented and there was an empty line in front of the fn.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is true. @kindlychung any chance you're interested in sending a second PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be honest I am a bit confused by the rollups below. Not yet very good at git. 😄

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries, it's a rust-specific thing. We wouldn't want to, for example, run the full test suite for a tiny change like this, so we "roll up" a bunch of them together and run the tests for them all at once.

Adding the spaces would be a totally new pull request.

On Apr 15, 2016, 18:08 -0400, Kaiyin Zhongnotifications@github.com, wrote:

Insrc/doc/book/closures.md(#32973 (comment)):

let f = factory();>>let answer = f(1);>assert_eq!(6, answer);>-# }>+}

To be honest I am a bit confused by the rollups below. Not yet very good at git. 😄


You are receiving this because you were mentioned.
Reply to this email directly orview it on GitHub(https://github.com/rust-lang/rust/pull/32973/files/f91649144e1e2e6b3664545cb7e117d839f9cd95#r59948089)

```

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