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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

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);
}