]>
Commit | Line | Data |
---|---|---|
0531ce1d XL |
1 | #[link(name = "foo", kind = "static")] |
2 | extern { | |
3 | fn test_start(f: extern fn()); | |
4 | fn test_end(); | |
5 | } | |
1a4d82fc | 6 | |
0531ce1d XL |
7 | fn main() { |
8 | unsafe { | |
9 | test_start(test_middle); | |
10 | } | |
11 | } | |
1a4d82fc JJ |
12 | |
13 | struct A; | |
0531ce1d | 14 | |
1a4d82fc JJ |
15 | impl Drop for A { |
16 | fn drop(&mut self) { | |
223e47cc | 17 | } |
1a4d82fc JJ |
18 | } |
19 | ||
0531ce1d XL |
20 | extern fn test_middle() { |
21 | let _a = A; | |
22 | foo(); | |
23 | } | |
223e47cc | 24 | |
0531ce1d XL |
25 | fn foo() { |
26 | let _a = A; | |
223e47cc | 27 | unsafe { |
0531ce1d | 28 | test_end(); |
223e47cc LB |
29 | } |
30 | } |