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

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 00:04:09 -08:00
pub fn main() {
unsafe {
2013-08-17 08:37:42 -07:00
let _foo = foreign_lib::rustrt::rust_get_test_int();
}
2011-11-18 16:29:01 -08:00
}