]> git.lizzy.rs Git - rust.git/blob - tests/ui/feature-gates/feature-gate-thread_local.rs
Rollup merge of #107306 - compiler-errors:correct-sugg-for-closure-arg-needs-borrow...
[rust.git] / tests / 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() {}