]> git.lizzy.rs Git - rust.git/commit
auto merge of #13676 : mdinger/rust/tutorial_doc, r=pnkfelix
authorbors <bors@rust-lang.org>
Sun, 4 May 2014 21:21:52 +0000 (14:21 -0700)
committerbors <bors@rust-lang.org>
Sun, 4 May 2014 21:21:52 +0000 (14:21 -0700)
commit028159ead403c09efcaa2b0bb0738d33209c3950
tree68e88ef840173435a8b532e936ff8288ce8935b6
parent59569397fbcd0a9b7b3649cd9957cace2d6889d8
parentb3d7aa39240f17ca8b496b31908da4c08a639555
auto merge of #13676 : mdinger/rust/tutorial_doc, r=pnkfelix

Improve tutorial discussion of closures, e.g. with respect to type inference and variable capture.

Fix #13621

---- original description follows

I'd like this pulled to master if possible but if not I'd appreciate comments on what I need to change.  I found the closures difficult to understand as they were so I tried to explain it so I would've had an easier time understanding it.  I think it's better at least, somewhat.

I don't know that everyone liked the `-> ()` I included but I thought explicit is best to aid understanding.  I thought it was much harder to understand than it should have been.

[EDIT] - Clicked too early.
This doesn't `make check` without errors on my Xubuntu on Virtualbox machine.  Not sure why.  I don't think I changed anything problematic.  I'll try `make check` on master tomorrow.

Opened https://github.com/mozilla/rust/issues/13621 regarding this.
src/doc/guide-tasks.md
src/doc/tutorial.md