]> git.lizzy.rs Git - rust.git/blob - tests/run-make-fulldeps/static-unwinding/lib.rs
Rollup merge of #106407 - mejrs:attr_check, r=compiler-errors
[rust.git] / tests / run-make-fulldeps / static-unwinding / lib.rs
1 #![crate_type = "rlib"]
2
3 pub static mut statik: isize = 0;
4
5 struct A;
6 impl Drop for A {
7     fn drop(&mut self) {
8         unsafe { statik = 1; }
9     }
10 }
11
12 pub fn callback<F>(f: F) where F: FnOnce() {
13     let _a = A;
14     f();
15 }