From 6bcc3a6c5742b5436d0c7f8be4bfb79f7eacd760 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Tue, 7 May 2013 13:53:25 -0700 Subject: Add some tests for local data + borrowed pointers --- src/libcore/task/local_data.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/libcore/task') 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 -- cgit 1.4.1-3-g733a5