rust/tests/ui/feature-gates/feature-gate-cfg-target-thread-local.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
325 B
Rust
Raw Normal View History

// 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" {
#[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
static FOO: u32;
}
fn main() {
assert_eq!(FOO, 3);
}