Remove references to obsolete `do` keyword
Also add the new `proc` keyword to the documentation.
This commit is contained in:
parent
4cf8d8ce69
commit
fbba696a46
|
@ -206,13 +206,12 @@ The keywords are the following strings:
|
||||||
as
|
as
|
||||||
break
|
break
|
||||||
crate
|
crate
|
||||||
do
|
|
||||||
else enum extern
|
else enum extern
|
||||||
false fn for
|
false fn for
|
||||||
if impl in
|
if impl in
|
||||||
let loop
|
let loop
|
||||||
match mod mut
|
match mod mut
|
||||||
priv pub
|
priv proc pub
|
||||||
ref return
|
ref return
|
||||||
self static struct super
|
self static struct super
|
||||||
true trait type
|
true trait type
|
||||||
|
@ -2558,12 +2557,12 @@ task in a _failing state_.
|
||||||
|
|
||||||
~~~~ {.ignore}
|
~~~~ {.ignore}
|
||||||
# use std::task;
|
# use std::task;
|
||||||
# do task::spawn {
|
# task::spawn(proc() {
|
||||||
|
|
||||||
([1, 2, 3, 4])[0];
|
([1, 2, 3, 4])[0];
|
||||||
(["a", "b"])[10]; // fails
|
(["a", "b"])[10]; // fails
|
||||||
|
|
||||||
# }
|
# })
|
||||||
~~~~
|
~~~~
|
||||||
|
|
||||||
### Unary operator expressions
|
### Unary operator expressions
|
||||||
|
|
|
@ -165,12 +165,12 @@ that one can still write things like `#[deriving(Eq)]`).
|
||||||
# // what's actually being documented.
|
# // what's actually being documented.
|
||||||
# fn fib(n: int) { n + 2 }
|
# fn fib(n: int) { n + 2 }
|
||||||
|
|
||||||
do spawn { fib(200); }
|
spawn(proc() { fib(200); })
|
||||||
```
|
```
|
||||||
*/
|
*/
|
||||||
# fn foo() {}
|
# 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).
|
testing this code, the `fib` function will be included (so it can compile).
|
||||||
|
|
||||||
## Running tests (advanced)
|
## Running tests (advanced)
|
||||||
|
|
Loading…
Reference in New Issue