Skip to content

Commit fbba696

Browse files
committed
Remove references to obsolete do keyword
Also add the new `proc` keyword to the documentation.
1 parent 4cf8d8c commit fbba696

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/doc/rust.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -206,13 +206,12 @@ The keywords are the following strings:
206206
as
207207
break
208208
crate
209-
do
210209
else enum extern
211210
false fn for
212211
if impl in
213212
let loop
214213
match mod mut
215-
priv pub
214+
priv proc pub
216215
ref return
217216
self static struct super
218217
true trait type
@@ -2558,12 +2557,12 @@ task in a _failing state_.
25582557

25592558
~~~~ {.ignore}
25602559
# use std::task;
2561-
# do task::spawn {
2560+
# task::spawn(proc() {
25622561
25632562
([1, 2, 3, 4])[0];
25642563
(["a", "b"])[10]; // fails
25652564
2566-
# }
2565+
# })
25672566
~~~~
25682567

25692568
### Unary operator expressions

src/doc/rustdoc.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -165,12 +165,12 @@ that one can still write things like `#[deriving(Eq)]`).
165165
# // what's actually being documented.
166166
# fn fib(n: int) { n + 2 }
167167

168-
do spawn { fib(200); }
168+
spawn(proc() { fib(200); })
169169
```
170170
*/
171171
# fn foo() {}
172172

173-
The documentation online would look like `do spawn { fib(200); }`, but when
173+
The documentation online would look like `spawn(proc() { fib(200); })`, but when
174174
testing this code, the `fib` function will be included (so it can compile).
175175

176176
## Running tests (advanced)

0 commit comments

Comments
 (0)