2015-04-14 23:26:42 -07:00
|
|
|
#![crate_type = "staticlib"]
|
|
|
|
|
|
|
|
|
|
struct Destroy;
|
|
|
|
|
impl Drop for Destroy {
|
2024-05-29 15:01:33 +10:00
|
|
|
fn drop(&mut self) {
|
|
|
|
|
println!("drop");
|
|
|
|
|
}
|
2015-04-14 23:26:42 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
thread_local! {
|
|
|
|
|
static X: Destroy = Destroy
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[no_mangle]
|
|
|
|
|
pub extern "C" fn foo() {
|
|
|
|
|
X.with(|_| ());
|
|
|
|
|
}
|