]> git.lizzy.rs Git - rust.git/blob - src/test/run-make-fulldeps/longjmp-across-rust/main.rs
Rollup merge of #100473 - compiler-errors:normalize-the-fn-def-sig-plz, r=lcnr
[rust.git] / src / test / run-make-fulldeps / longjmp-across-rust / main.rs
1 #[link(name = "foo", kind = "static")]
2 extern "C" {
3     fn test_start(f: extern "C" fn());
4     fn test_end();
5 }
6
7 fn main() {
8     unsafe {
9         test_start(test_middle);
10     }
11 }
12
13 struct A;
14
15 impl Drop for A {
16     fn drop(&mut self) {}
17 }
18
19 extern "C" fn test_middle() {
20     let _a = A;
21     foo();
22 }
23
24 fn foo() {
25     let _a = A;
26     unsafe {
27         test_end();
28     }
29 }