about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2016-02-04 17:50:32 +0530
committerManish Goregaokar <manishsmail@gmail.com>2016-02-04 22:23:23 +0530
commit4b68c293fdf64749975adfa0c70c8b3eda649bad (patch)
tree2350fa3996a1a8959a58a661d7e1901b05ab87cc /src
parent6c4f0bf79b608a66e617accab4c421a7705456fb (diff)
downloadrust-4b68c293fdf64749975adfa0c70c8b3eda649bad.tar.gz
rust-4b68c293fdf64749975adfa0c70c8b3eda649bad.zip
Test for unsafe code in TLS macro
Diffstat (limited to 'src')
-rw-r--r--src/test/run-pass/issue-30756.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/run-pass/issue-30756.rs b/src/test/run-pass/issue-30756.rs
new file mode 100644
index 00000000000..d21b42f8c87
--- /dev/null
+++ b/src/test/run-pass/issue-30756.rs
@@ -0,0 +1,16 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![deny(unsafe_code)]
+
+thread_local!(static FOO: u8 = 1);
+
+fn main() {
+}