Skip to content

Commit d499bbb

Browse files
committed
Use #[cfg(target_thread_local)] on items
1 parent 3019a34 commit d499bbb

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Diff for: tests/ui/thread-local/auxiliary/tls-export.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
#![crate_type = "dylib"]
22
#![feature(thread_local)]
33
#![feature(cfg_target_thread_local)]
4-
#![cfg(target_thread_local)]
54

65
extern crate tls_rlib;
76

87
pub use tls_rlib::*;
98

9+
#[cfg(target_thread_local)]
1010
#[thread_local]
1111
pub static FOO: bool = true;
1212

13+
#[cfg(target_thread_local)]
1314
#[inline(never)]
1415
pub fn foo_addr() -> usize {
1516
&FOO as *const bool as usize

Diff for: tests/ui/thread-local/auxiliary/tls-rlib.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
#![crate_type = "rlib"]
44
#![feature(thread_local)]
55
#![feature(cfg_target_thread_local)]
6-
#![cfg(target_thread_local)]
76

7+
#[cfg(target_thread_local)]
88
#[thread_local]
99
pub static BAR: bool = true;
1010

11+
#[cfg(target_thread_local)]
1112
#[inline(never)]
1213
pub fn bar_addr() -> usize {
1314
&BAR as *const bool as usize

0 commit comments

Comments
 (0)