Skip to content

Commit 3d640a9

Browse files
committed
Test: ensure thread does not initialize the TLS key
1 parent 8f51622 commit 3d640a9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/ui/thread-local/spawned-thread-dtor.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ impl Drop for Foo {
1515
thread_local!(static FOO: Foo = Foo);
1616

1717
fn main() {
18+
FOO.with(|_| {});
19+
1820
std::thread::spawn(|| {
1921
FOO.with(|_| {});
2022
std::process::exit(0);

0 commit comments

Comments
 (0)