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