Move /src/test to /tests
This commit is contained in:
parent
ca855e6e42
commit
cf2dff2b1e
27592 changed files with 0 additions and 0 deletions
|
@ -0,0 +1,22 @@
|
|||
// run-pass
|
||||
// no-prefer-dynamic
|
||||
// ignore-emscripten no threads support
|
||||
|
||||
static mut HIT: bool = false;
|
||||
|
||||
struct Foo;
|
||||
|
||||
impl Drop for Foo {
|
||||
fn drop(&mut self) {
|
||||
unsafe { HIT = true; }
|
||||
}
|
||||
}
|
||||
|
||||
thread_local!(static FOO: Foo = Foo);
|
||||
|
||||
fn main() {
|
||||
std::thread::spawn(|| {
|
||||
FOO.with(|_| {});
|
||||
}).join().unwrap();
|
||||
assert!(unsafe { HIT });
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue