about summary refs log tree commit diff
path: root/src/libcore/task.rs
diff options
context:
space:
mode:
authorMichael Sullivan <sully@msully.net>2012-07-11 23:42:26 -0700
committerMichael Sullivan <sully@msully.net>2012-07-12 16:52:26 -0700
commit2ea9c8df0f7c9ee72913883128b37d0a80d2f4f6 (patch)
treeb3e4acbf2912f804cb45f87e8819a5e4847ec213 /src/libcore/task.rs
parentacb86921a62ba01726fd922f55d0176fa6c1df7c (diff)
downloadrust-2ea9c8df0f7c9ee72913883128b37d0a80d2f4f6.tar.gz
rust-2ea9c8df0f7c9ee72913883128b37d0a80d2f4f6.zip
Accept prefix notation for writing the types of str/~ and friends.
Diffstat (limited to 'src/libcore/task.rs')
-rw-r--r--src/libcore/task.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/libcore/task.rs b/src/libcore/task.rs
index 3d05611aa98..3ba11243155 100644
--- a/src/libcore/task.rs
+++ b/src/libcore/task.rs
@@ -1300,7 +1300,7 @@ fn test_unkillable_nested() {
 
 #[test]
 fn test_tls_multitask() unsafe {
-    fn my_key(+_x: @str) { }
+    fn my_key(+_x: @str/~) { }
     local_data_set(my_key, @"parent data");
     do task::spawn {
         assert local_data_get(my_key) == none; // TLS shouldn't carry over.
@@ -1316,7 +1316,7 @@ fn test_tls_multitask() unsafe {
 
 #[test]
 fn test_tls_overwrite() unsafe {
-    fn my_key(+_x: @str) { }
+    fn my_key(+_x: @str/~) { }
     local_data_set(my_key, @"first data");
     local_data_set(my_key, @"next data"); // Shouldn't leak.
     assert *(local_data_get(my_key).get()) == "next data";
@@ -1324,7 +1324,7 @@ fn test_tls_overwrite() unsafe {
 
 #[test]
 fn test_tls_pop() unsafe {
-    fn my_key(+_x: @str) { }
+    fn my_key(+_x: @str/~) { }
     local_data_set(my_key, @"weasel");
     assert *(local_data_pop(my_key).get()) == "weasel";
     // Pop must remove the data from the map.
@@ -1333,7 +1333,7 @@ fn test_tls_pop() unsafe {
 
 #[test]
 fn test_tls_modify() unsafe {
-    fn my_key(+_x: @str) { }
+    fn my_key(+_x: @str/~) { }
     local_data_modify(my_key, |data| {
         alt data {
             some(@val) { fail "unwelcome value: " + val }
@@ -1357,7 +1357,7 @@ fn test_tls_crust_automorestack_memorial_bug() unsafe {
     // jump over to the rust stack, which causes next_c_sp to get recorded as
     // something within a rust stack segment. Then a subsequent upcall (esp.
     // for logging, think vsnprintf) would run on a stack smaller than 1 MB.
-    fn my_key(+_x: @str) { }
+    fn my_key(+_x: @str/~) { }
     do task::spawn {
         unsafe { local_data_set(my_key, @"hax"); }
     }
@@ -1365,7 +1365,7 @@ fn test_tls_crust_automorestack_memorial_bug() unsafe {
 
 #[test]
 fn test_tls_multiple_types() unsafe {
-    fn str_key(+_x: @str) { }
+    fn str_key(+_x: @str/~) { }
     fn box_key(+_x: @@()) { }
     fn int_key(+_x: @int) { }
     do task::spawn {
@@ -1377,7 +1377,7 @@ fn test_tls_multiple_types() unsafe {
 
 #[test]
 fn test_tls_overwrite_multiple_types() unsafe {
-    fn str_key(+_x: @str) { }
+    fn str_key(+_x: @str/~) { }
     fn box_key(+_x: @@()) { }
     fn int_key(+_x: @int) { }
     do task::spawn {
@@ -1393,7 +1393,7 @@ fn test_tls_overwrite_multiple_types() unsafe {
 #[should_fail]
 #[ignore(cfg(windows))]
 fn test_tls_cleanup_on_failure() unsafe {
-    fn str_key(+_x: @str) { }
+    fn str_key(+_x: @str/~) { }
     fn box_key(+_x: @@()) { }
     fn int_key(+_x: @int) { }
     local_data_set(str_key, @"parent data");