about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2013-07-11 01:03:37 -0700
committerAlex Crichton <alex@alexcrichton.com>2013-07-11 18:57:19 -0700
commita15c1b4464099fa65ec5da389381db83c22801ec (patch)
treec1a724e767bdef35f7865ba55408fe0e3e52ce8e
parentf9bf69d253e43f9caf279953876d44f6219e71de (diff)
downloadrust-a15c1b4464099fa65ec5da389381db83c22801ec.tar.gz
rust-a15c1b4464099fa65ec5da389381db83c22801ec.zip
Fix tests
-rw-r--r--src/librusti/program.rs8
-rw-r--r--src/libstd/local_data.rs2
-rw-r--r--src/test/compile-fail/core-tls-store-pointer.rs4
3 files changed, 7 insertions, 7 deletions
diff --git a/src/librusti/program.rs b/src/librusti/program.rs
index 03a48117cd4..716c7a2481e 100644
--- a/src/librusti/program.rs
+++ b/src/librusti/program.rs
@@ -58,7 +58,7 @@ struct LocalVariable {
 }
 
 type LocalCache = @mut HashMap<~str, @~[u8]>;
-fn tls_key(_k: @LocalCache) {}
+fn tls_key(_k: LocalCache) {}
 
 impl Program {
     pub fn new() -> Program {
@@ -132,7 +132,7 @@ impl Program {
         ");
 
         let key: sys::Closure = unsafe {
-            let tls_key: &'static fn(@LocalCache) = tls_key;
+            let tls_key: &'static fn(LocalCache) = tls_key;
             cast::transmute(tls_key)
         };
         // First, get a handle to the tls map which stores all the local
@@ -144,7 +144,7 @@ impl Program {
                 let key = ::std::sys::Closure{ code: %? as *(),
                                                env: ::std::ptr::null() };
                 let key = ::std::cast::transmute(key);
-                *::std::local_data::get(key, |k| k.map(|&x| *x)).unwrap()
+                ::std::local_data::get(key, |k| k.map(|&x| *x)).unwrap()
             };\n", key.code as uint));
 
         // Using this __tls_map handle, deserialize each variable binding that
@@ -227,7 +227,7 @@ impl Program {
             map.insert(copy *name, @copy value.data);
         }
         unsafe {
-            local_data::set(tls_key, @map);
+            local_data::set(tls_key, map);
         }
     }
 
diff --git a/src/libstd/local_data.rs b/src/libstd/local_data.rs
index fa981d273e2..b241de88700 100644
--- a/src/libstd/local_data.rs
+++ b/src/libstd/local_data.rs
@@ -170,7 +170,7 @@ fn test_tls_pop() {
     unsafe {
         fn my_key(_x: @~str) { }
         set(my_key, @~"weasel");
-        assert!(*(pop(my_key, |k| k.map(|&k| *k)).get()) == ~"weasel");
+        assert!(*(pop(my_key).get()) == ~"weasel");
         // Pop must remove the data from the map.
         assert!(pop(my_key).is_none());
     }
diff --git a/src/test/compile-fail/core-tls-store-pointer.rs b/src/test/compile-fail/core-tls-store-pointer.rs
index 63bbaf80177..13c99669228 100644
--- a/src/test/compile-fail/core-tls-store-pointer.rs
+++ b/src/test/compile-fail/core-tls-store-pointer.rs
@@ -10,12 +10,12 @@
 
 // Testing that we can't store a borrowed pointer it task-local storage
 
-use std::local_data::*;
+use std::local_data;
 
 fn key(_x: @&int) { }
 
 fn main() {
     unsafe {
-        local_data_set(key, @&0); //~ ERROR does not fulfill `'static`
+        local_data::set(key, @&0); //~ ERROR does not fulfill `'static`
     }
 }