rust/tests/run-make/static-unwinding/lib.rs

16 lines
225 B
Rust
Raw Normal View History

#![crate_type = "rlib"]
2015-02-17 21:00:20 -06:00
pub static mut statik: isize = 0;
struct A;
impl Drop for A {
fn drop(&mut self) {
unsafe { statik = 1; }
}
}
2015-01-04 22:33:35 -06:00
pub fn callback<F>(f: F) where F: FnOnce() {
let _a = A;
f();
}