diff options
| author | Scott Lawrence <bytbox@gmail.com> | 2014-01-26 22:42:26 -0500 |
|---|---|---|
| committer | Scott Lawrence <bytbox@gmail.com> | 2014-01-29 09:15:41 -0500 |
| commit | 25e7e7f8076d879f824f013faa6f7470e69c818b (patch) | |
| tree | 9acb92473ae0a0f1463901fe97e222e07da55b6b /src/libstd/unstable | |
| parent | af218d68e4b4916440ef2b4fc076a7bd8dead892 (diff) | |
| download | rust-25e7e7f8076d879f824f013faa6f7470e69c818b.tar.gz rust-25e7e7f8076d879f824f013faa6f7470e69c818b.zip | |
Removing do keyword from libstd and librustc
Diffstat (limited to 'src/libstd/unstable')
| -rw-r--r-- | src/libstd/unstable/mod.rs | 8 | ||||
| -rw-r--r-- | src/libstd/unstable/mutex.rs | 8 | ||||
| -rw-r--r-- | src/libstd/unstable/sync.rs | 8 |
3 files changed, 12 insertions, 12 deletions
diff --git a/src/libstd/unstable/mod.rs b/src/libstd/unstable/mod.rs index f4573785996..87870ef0331 100644 --- a/src/libstd/unstable/mod.rs +++ b/src/libstd/unstable/mod.rs @@ -41,18 +41,18 @@ pub fn run_in_bare_thread(f: proc()) { #[test] fn test_run_in_bare_thread() { let i = 100; - do run_in_bare_thread { + run_in_bare_thread(proc() { assert_eq!(i, 100); - } + }); } #[test] fn test_run_in_bare_thread_exchange() { // Does the exchange heap work without the runtime? let i = ~100; - do run_in_bare_thread { + run_in_bare_thread(proc() { assert!(i == ~100); - } + }); } /// Dynamically inquire about whether we're running under V. diff --git a/src/libstd/unstable/mutex.rs b/src/libstd/unstable/mutex.rs index ba965f2b5c5..39f0d7b5638 100644 --- a/src/libstd/unstable/mutex.rs +++ b/src/libstd/unstable/mutex.rs @@ -439,7 +439,7 @@ mod test { let (p, c) = SharedChan::new(); for _ in range(0, 10) { let c = c.clone(); - do spawn { + spawn(proc() { for _ in range(0, 4) { task::deschedule() } unsafe { o.doit(|| { @@ -449,7 +449,7 @@ mod test { assert!(run); } c.send(()); - } + }); } unsafe { @@ -479,11 +479,11 @@ mod test { static mut lock: Mutex = MUTEX_INIT; unsafe { lock.lock(); - let t = do Thread::start { + let t = Thread::start(proc() { lock.lock(); lock.signal(); lock.unlock(); - }; + }); lock.wait(); lock.unlock(); t.join(); diff --git a/src/libstd/unstable/sync.rs b/src/libstd/unstable/sync.rs index 687efea939b..3b2c86c3712 100644 --- a/src/libstd/unstable/sync.rs +++ b/src/libstd/unstable/sync.rs @@ -179,12 +179,12 @@ mod tests { let (port, chan) = Chan::new(); futures.push(port); - do task::spawn { + task::spawn(proc() { for _ in range(0u, count) { total.with(|count| **count += 1); } chan.send(()); - } + }); }; for f in futures.mut_iter() { f.recv() } @@ -200,9 +200,9 @@ mod tests { // accesses will also fail. let x = Exclusive::new(1); let x2 = x.clone(); - do task::try || { + task::try(proc() { x2.with(|one| assert_eq!(*one, 2)) - }; + }); x.with(|one| assert_eq!(*one, 1)); } } |
