2019-07-27 00:54:25 +03:00
|
|
|
// run-pass
|
2012-06-26 16:18:37 -07:00
|
|
|
// aux-build:foreign_lib.rs
|
2017-10-22 20:01:00 -07:00
|
|
|
// ignore-wasm32-bare no libc to test ffi with
|
2011-10-21 12:14:01 -07:00
|
|
|
|
|
|
|
// The purpose of this test is to check that we can
|
2011-11-09 16:04:07 -08:00
|
|
|
// successfully (and safely) invoke external, cdecl
|
2011-10-21 12:14:01 -07:00
|
|
|
// functions from outside the crate.
|
|
|
|
|
2015-03-22 13:13:15 -07:00
|
|
|
// pretty-expanded FIXME #23616
|
|
|
|
|
2014-02-14 10:10:06 -08:00
|
|
|
extern crate foreign_lib;
|
2012-03-10 00:04:09 -08:00
|
|
|
|
2013-02-01 19:43:17 -08:00
|
|
|
pub fn main() {
|
2013-05-24 19:35:29 -07:00
|
|
|
unsafe {
|
2013-08-17 08:37:42 -07:00
|
|
|
let _foo = foreign_lib::rustrt::rust_get_test_int();
|
2013-05-24 19:35:29 -07:00
|
|
|
}
|
2011-11-18 16:29:01 -08:00
|
|
|
}
|