2018-08-30 12:18:55 +00:00
|
|
|
// run-pass
|
2015-12-14 23:40:43 +00:00
|
|
|
// aux-build:extern-take-value.rs
|
2015-03-22 20:13:15 +00:00
|
|
|
|
2015-12-14 23:40:43 +00:00
|
|
|
extern crate extern_take_value;
|
2012-02-11 01:46:53 +00:00
|
|
|
|
2013-02-02 03:43:17 +00:00
|
|
|
pub fn main() {
|
2015-12-14 23:40:43 +00:00
|
|
|
let a: extern "C" fn() -> i32 = extern_take_value::get_f();
|
|
|
|
let b: extern "C" fn() -> i32 = extern_take_value::get_f();
|
|
|
|
let c: extern "C" fn() -> i32 = extern_take_value::get_g();
|
2012-02-11 01:46:53 +00:00
|
|
|
|
2014-02-28 09:23:06 +00:00
|
|
|
assert!(a == b);
|
2013-08-30 22:06:11 +00:00
|
|
|
assert!(a != c);
|
2012-02-11 01:46:53 +00:00
|
|
|
}
|