diff options
| author | bors <bors@rust-lang.org> | 2014-04-05 07:21:36 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-04-05 07:21:36 -0700 |
| commit | 2dcdc75c6cc5575ca5fc5d38bf0889a984e04c5a (patch) | |
| tree | 886f92864eb5b4979494090ce6a57a1d44b3cf34 /src | |
| parent | 60d3c082e8c8d065022988e764e8b44057478ec0 (diff) | |
| parent | fbba696a4686f0d4415ff728eb9441a2e0782e27 (diff) | |
| download | rust-2dcdc75c6cc5575ca5fc5d38bf0889a984e04c5a.tar.gz rust-2dcdc75c6cc5575ca5fc5d38bf0889a984e04c5a.zip | |
auto merge of #13332 : mbrubeck/rust/doc-edit, r=huonw
Also add the new `proc` keyword to the documentation.
Diffstat (limited to 'src')
| -rw-r--r-- | src/doc/rust.md | 7 | ||||
| -rw-r--r-- | src/doc/rustdoc.md | 4 |
2 files changed, 5 insertions, 6 deletions
diff --git a/src/doc/rust.md b/src/doc/rust.md index f73b40a3ff4..96ec52c8cf9 100644 --- a/src/doc/rust.md +++ b/src/doc/rust.md @@ -206,13 +206,12 @@ The keywords are the following strings: as break crate -do else enum extern false fn for if impl in let loop match mod mut -priv pub +priv proc pub ref return self static struct super true trait type @@ -2558,12 +2557,12 @@ task in a _failing state_. ~~~~ {.ignore} # use std::task; -# do task::spawn { +# task::spawn(proc() { ([1, 2, 3, 4])[0]; (["a", "b"])[10]; // fails -# } +# }) ~~~~ ### Unary operator expressions diff --git a/src/doc/rustdoc.md b/src/doc/rustdoc.md index 5d41f297e7d..96419e1bfd2 100644 --- a/src/doc/rustdoc.md +++ b/src/doc/rustdoc.md @@ -165,12 +165,12 @@ that one can still write things like `#[deriving(Eq)]`). # // what's actually being documented. # fn fib(n: int) { n + 2 } - do spawn { fib(200); } + spawn(proc() { fib(200); }) ``` */ # fn foo() {} -The documentation online would look like `do spawn { fib(200); }`, but when +The documentation online would look like `spawn(proc() { fib(200); })`, but when testing this code, the `fib` function will be included (so it can compile). ## Running tests (advanced) |
