Skip to content

Commit e001f3e

Browse files
committed
---
yaml --- r: 69575 b: refs/heads/auto c: 4b3e766 h: refs/heads/master i: 69573: 3d9678a 69571: babf7c5 69567: 65f9565 v: v3
1 parent c72de78 commit e001f3e

File tree

123 files changed

+766
-3006
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+766
-3006
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1414
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1515
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1616
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17-
refs/heads/auto: 7c21ccc4835326e87d6baaaaa8d1c616a398d924
17+
refs/heads/auto: 4b3e766ac6a6f89430b65a5bc2f55bb29f6290ab
1818
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1919
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c

branches/auto/doc/tutorial-tasks.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ an intermediate generation has already exited:
548548
~~~
549549
# use std::task;
550550
# fn sleep_forever() { loop { task::yield() } }
551-
# fn wait_for_a_while() { do 1000.times { task::yield() } }
551+
# fn wait_for_a_while() { for 1000.times { task::yield() } }
552552
# do task::try::<int> {
553553
do task::spawn_supervised {
554554
do task::spawn_supervised {
@@ -567,7 +567,7 @@ other at all, using `task::spawn_unlinked` for _isolated failure_.
567567
~~~
568568
# use std::task;
569569
# fn random() -> uint { 100 }
570-
# fn sleep_for(i: uint) { do i.times { task::yield() } }
570+
# fn sleep_for(i: uint) { for i.times { task::yield() } }
571571
# do task::try::<()> {
572572
let (time1, time2) = (random(), random());
573573
do task::spawn_unlinked {

branches/auto/doc/tutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1899,7 +1899,7 @@ struct TimeBomb {
18991899
19001900
impl Drop for TimeBomb {
19011901
fn drop(&self) {
1902-
do self.explosivity.times {
1902+
for self.explosivity.times {
19031903
println("blam!");
19041904
}
19051905
}

branches/auto/src/libextra/arc.rs

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
* let numbers=vec::from_fn(100, |ind| (ind as float)*rand::random());
2424
* let shared_numbers=arc::Arc::new(numbers);
2525
*
26-
* do 10.times {
26+
* for 10.times {
2727
* let (port, chan) = stream();
2828
* chan.send(shared_numbers.clone());
2929
*
@@ -576,16 +576,12 @@ mod tests {
576576
let (p, c) = comm::stream();
577577
578578
do task::spawn() || {
579-
let p = comm::PortSet::new();
580-
c.send(p.chan());
581-
582579
let arc_v : Arc<~[int]> = p.recv();
583580
584581
let v = (*arc_v.get()).clone();
585582
assert_eq!(v[3], 4);
586583
};
587584
588-
let c = p.recv();
589585
c.send(arc_v.clone());
590586
591587
assert_eq!(arc_v.get()[2], 3);
@@ -765,7 +761,7 @@ mod tests {
765761
766762
do task::spawn || {
767763
do arc2.write |num| {
768-
do 10.times {
764+
for 10.times {
769765
let tmp = *num;
770766
*num = -1;
771767
task::yield();
@@ -777,7 +773,7 @@ mod tests {
777773
778774
// Readers try to catch the writer in the act
779775
let mut children = ~[];
780-
do 5.times {
776+
for 5.times {
781777
let arc3 = (*arc).clone();
782778
let mut builder = task::task();
783779
builder.future_result(|r| children.push(r));
@@ -811,7 +807,7 @@ mod tests {
811807
812808
// Reader tasks
813809
let mut reader_convos = ~[];
814-
do 10.times {
810+
for 10.times {
815811
let ((rp1,rc1),(rp2,rc2)) = (comm::stream(),comm::stream());
816812
reader_convos.push((rc1, rp2));
817813
let arcn = (*arc).clone();
@@ -925,7 +921,7 @@ mod tests {
925921
do read_mode.read |state| {
926922
// if writer mistakenly got in, make sure it mutates state
927923
// before we assert on it
928-
do 5.times { task::yield(); }
924+
for 5.times { task::yield(); }
929925
// make sure writer didn't get in.
930926
assert!(*state);
931927
}
@@ -937,6 +933,6 @@ mod tests {
937933
// helped to expose the race nearly 100% of the time... but adding
938934
// yields in the intuitively-right locations made it even less likely,
939935
// and I wasn't sure why :( . This is a mediocre "next best" option.
940-
do 8.times { test_rw_write_cond_downgrade_read_race_helper() }
936+
for 8.times { test_rw_write_cond_downgrade_read_race_helper() }
941937
}
942938
}

branches/auto/src/libextra/arena.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,11 @@ impl Drop for Arena {
7272
fn drop(&self) {
7373
unsafe {
7474
destroy_chunk(&self.head);
75-
do self.chunks.each |chunk| {
75+
for self.chunks.each |chunk| {
7676
if !chunk.is_pod {
7777
destroy_chunk(chunk);
7878
}
79-
true
80-
};
79+
}
8180
}
8281
}
8382
}

branches/auto/src/libextra/base64.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -358,9 +358,9 @@ mod test {
358358
use std::rand::{task_rng, random, RngUtil};
359359
use std::vec;
360360
361-
do 1000.times {
361+
for 1000.times {
362362
let v: ~[u8] = do vec::build |push| {
363-
do task_rng().gen_uint_range(1, 100).times {
363+
for task_rng().gen_uint_range(1, 100).times {
364364
push(random());
365365
}
366366
};
@@ -389,4 +389,4 @@ mod test {
389389
bh.bytes = b.len() as u64;
390390
}
391391

392-
}
392+
}

0 commit comments

Comments
 (0)