diff options
| author | bors <bors@rust-lang.org> | 2013-08-01 12:52:29 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-08-01 12:52:29 -0700 |
| commit | 82b24559e6aa0914f8a49e0a9dbfb3cf35372515 (patch) | |
| tree | c2b0ff9b26400eac3f3405d78fe89dc07607c3ae /doc | |
| parent | 479809a267dbbcc3e2ec87da677c63430d3d229a (diff) | |
| parent | 94f1a5d6f8ecd30c6f59dfeaacdd5962f58bc44c (diff) | |
auto merge of #8190 : thestinger/rust/for, r=thestinger
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/tutorial-tasks.md | 4 | ||||
| -rw-r--r-- | doc/tutorial.md | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/doc/tutorial-tasks.md b/doc/tutorial-tasks.md index 3092dfff56e..08989be871b 100644 --- a/doc/tutorial-tasks.md +++ b/doc/tutorial-tasks.md @@ -548,7 +548,7 @@ an intermediate generation has already exited: ~~~ # use std::task; # fn sleep_forever() { loop { task::yield() } } -# fn wait_for_a_while() { for 1000.times { task::yield() } } +# fn wait_for_a_while() { do 1000.times { task::yield() } } # do task::try::<int> { do task::spawn_supervised { do task::spawn_supervised { @@ -567,7 +567,7 @@ other at all, using `task::spawn_unlinked` for _isolated failure_. ~~~ # use std::task; # fn random() -> uint { 100 } -# fn sleep_for(i: uint) { for i.times { task::yield() } } +# fn sleep_for(i: uint) { do i.times { task::yield() } } # do task::try::<()> { let (time1, time2) = (random(), random()); do task::spawn_unlinked { diff --git a/doc/tutorial.md b/doc/tutorial.md index a8ace8558b5..c9f1dfcd5a3 100644 --- a/doc/tutorial.md +++ b/doc/tutorial.md @@ -1899,7 +1899,7 @@ struct TimeBomb { impl Drop for TimeBomb { fn drop(&self) { - for self.explosivity.times { + do self.explosivity.times { println("blam!"); } } |
