]> git.proxmox.com Git - rustc.git/blob - src/test/compile-fail/feature-gate-cfg-target-thread-local.rs
New upstream version 1.23.0+dfsg1
[rustc.git] / src / test / compile-fail / feature-gate-cfg-target-thread-local.rs
1 // Copyright 2016 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
4 //
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
10
11 // ignore-windows
12 // aux-build:cfg-target-thread-local.rs
13
14 #![feature(thread_local)]
15
16 extern crate cfg_target_thread_local;
17
18 extern {
19 #[cfg_attr(target_thread_local, thread_local)]
20 //~^ `cfg(target_thread_local)` is experimental and subject to change (see issue #29594)
21
22 static FOO: u32;
23 }
24
25 fn main() {
26 assert_eq!(FOO, 3);
27 }