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