]> git.lizzy.rs Git - rust.git/blob - src/test/ui/feature-gates/feature-gate-thread_local.rs
Merge commit 'd3a2366ee877075c59b38bd8ced55f224fc7ef51' into sync_cg_clif-2022-07-26
[rust.git] / src / test / ui / feature-gates / feature-gate-thread_local.rs
1 // Test that `#[thread_local]` attribute is gated by `thread_local`
2 // feature gate.
3 //
4 // (Note that the `thread_local!` macro is explicitly *not* gated; it
5 // is given permission to expand into this unstable attribute even
6 // when the surrounding context does not have permission to use it.)
7
8 #[thread_local] //~ ERROR `#[thread_local]` is an experimental feature
9 static FOO: i32 = 3;
10
11 pub fn main() {}