about summary refs log tree commit diff
path: root/src/libstd/local_data.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2013-07-11 00:19:23 -0700
committerAlex Crichton <alex@alexcrichton.com>2013-07-11 00:22:08 -0700
commit11c63eaad2311bbeea67ec9a9300686dbe400e23 (patch)
tree9325b088dee7d55e9dfe0cc709eb0460e0d17fd9 /src/libstd/local_data.rs
parente3fb7062aa2d7113c4ff4cb41a27bfb637465d57 (diff)
downloadrust-11c63eaad2311bbeea67ec9a9300686dbe400e23.tar.gz
rust-11c63eaad2311bbeea67ec9a9300686dbe400e23.zip
Fix a soundness problem with `get`
Diffstat (limited to 'src/libstd/local_data.rs')
-rw-r--r--src/libstd/local_data.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libstd/local_data.rs b/src/libstd/local_data.rs
index a117d461cfd..711ed15fa9d 100644
--- a/src/libstd/local_data.rs
+++ b/src/libstd/local_data.rs
@@ -273,3 +273,11 @@ fn test_static_pointer() {
         set(key, @&VALUE);
     }
 }
+
+#[test]
+fn test_owned() {
+    unsafe {
+        fn key(_x: ~int) { }
+        set(key, ~1);
+    }
+}