about summary refs log tree commit diff
path: root/src/libstd/local_data.rs
diff options
context:
space:
mode:
authorScott Lawrence <bytbox@gmail.com>2014-01-26 22:42:26 -0500
committerScott Lawrence <bytbox@gmail.com>2014-01-29 09:15:41 -0500
commit25e7e7f8076d879f824f013faa6f7470e69c818b (patch)
tree9acb92473ae0a0f1463901fe97e222e07da55b6b /src/libstd/local_data.rs
parentaf218d68e4b4916440ef2b4fc076a7bd8dead892 (diff)
Removing do keyword from libstd and librustc
Diffstat (limited to 'src/libstd/local_data.rs')
-rw-r--r--src/libstd/local_data.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/libstd/local_data.rs b/src/libstd/local_data.rs
index 7406fe8ee40..719cf2450c5 100644
--- a/src/libstd/local_data.rs
+++ b/src/libstd/local_data.rs
@@ -355,14 +355,14 @@ mod tests {
     fn test_tls_multitask() {
         static my_key: Key<~str> = &Key;
         set(my_key, ~"parent data");
-        do task::spawn {
+        task::spawn(proc() {
             // TLS shouldn't carry over.
             assert!(get(my_key, |k| k.map(|k| (*k).clone())).is_none());
             set(my_key, ~"child data");
             assert!(get(my_key, |k| k.map(|k| (*k).clone())).unwrap() ==
                     ~"child data");
             // should be cleaned up for us
-        }
+        });
         // Must work multiple times
         assert!(get(my_key, |k| k.map(|k| (*k).clone())).unwrap() == ~"parent data");
         assert!(get(my_key, |k| k.map(|k| (*k).clone())).unwrap() == ~"parent data");
@@ -414,9 +414,9 @@ mod tests {
         // subsequent upcall (esp. for logging, think vsnprintf) would run on
         // a stack smaller than 1 MB.
         static my_key: Key<~str> = &Key;
-        do task::spawn {
+        task::spawn(proc() {
             set(my_key, ~"hax");
-        }
+        });
     }
 
     #[test]
@@ -424,11 +424,11 @@ mod tests {
         static str_key: Key<~str> = &Key;
         static box_key: Key<@()> = &Key;
         static int_key: Key<int> = &Key;
-        do task::spawn {
+        task::spawn(proc() {
             set(str_key, ~"string data");
             set(box_key, @());
             set(int_key, 42);
-        }
+        });
     }
 
     #[test]
@@ -437,7 +437,7 @@ mod tests {
         static str_key: Key<~str> = &Key;
         static box_key: Key<@()> = &Key;
         static int_key: Key<int> = &Key;
-        do task::spawn {
+        task::spawn(proc() {
             set(str_key, ~"string data");
             set(str_key, ~"string data 2");
             set(box_key, @());
@@ -447,7 +447,7 @@ mod tests {
             // with the crazy polymorphic transmute rather than the provided
             // finaliser.
             set(int_key, 31337);
-        }
+        });
     }
 
     #[test]
@@ -458,13 +458,13 @@ mod tests {
         static int_key: Key<int> = &Key;
         set(str_key, ~"parent data");
         set(box_key, @());
-        do task::spawn {
+        task::spawn(proc() {
             // spawn_linked
             set(str_key, ~"string data");
             set(box_key, @());
             set(int_key, 42);
             fail!();
-        }
+        });
         // Not quite nondeterministic.
         set(int_key, 31337);
         fail!();