about summary refs log tree commit diff
path: root/src/libcore/task
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcore/task')
-rw-r--r--src/libcore/task/local_data.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libcore/task/local_data.rs b/src/libcore/task/local_data.rs
index dff5908c047..89a31b7b3f5 100644
--- a/src/libcore/task/local_data.rs
+++ b/src/libcore/task/local_data.rs
@@ -215,3 +215,12 @@ fn test_tls_cleanup_on_failure() {
         fail!();
     }
 }
+
+#[test]
+fn test_static_pointer() {
+    unsafe {
+        fn key(_x: @&'static int) { }
+        static VALUE: int = 0;
+        local_data_set(key, @&VALUE);
+    }
+}
\ No newline at end of file