2017-03-05 14:10:39 -06:00
|
|
|
// ignore-windows
|
|
|
|
// aux-build:cfg-target-thread-local.rs
|
|
|
|
|
|
|
|
#![feature(thread_local)]
|
|
|
|
|
|
|
|
extern crate cfg_target_thread_local;
|
|
|
|
|
2020-09-01 16:12:52 -05:00
|
|
|
extern "C" {
|
2017-03-05 14:10:39 -06:00
|
|
|
#[cfg_attr(target_thread_local, thread_local)]
|
2019-04-10 18:40:12 -05:00
|
|
|
//~^ `cfg(target_thread_local)` is experimental and subject to change
|
2017-03-05 14:10:39 -06:00
|
|
|
static FOO: u32;
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
assert_eq!(FOO, 3);
|
|
|
|
}
|