rust/tests/run-make/issue-36710/foo.rs

11 lines
172 B
Rust
Raw Normal View History

// Tests that linking to C++ code with global destructors works.
2020-09-01 16:12:52 -05:00
extern "C" {
fn get() -> u32;
}
fn main() {
let i = unsafe { get() };
assert_eq!(i, 1234);
}