rust/tests/ui/abi/foreign/invoke-external-foreign.rs

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

16 lines
311 B
Rust
Raw Normal View History

//@ run-pass
//@ aux-build:foreign_lib.rs
// The purpose of this test is to check that we can
// successfully (and safely) invoke external, cdecl
// functions from outside the crate.
extern crate foreign_lib;
2012-03-10 08:04:09 +00:00
pub fn main() {
unsafe {
2013-08-17 15:37:42 +00:00
let _foo = foreign_lib::rustrt::rust_get_test_int();
}
2011-11-19 00:29:01 +00:00
}