rust/tests/ui/extern/extern-take-value.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
333 B
Rust
Raw Normal View History

// run-pass
2015-12-14 23:40:43 +00:00
// aux-build:extern-take-value.rs
2015-12-14 23:40:43 +00:00
extern crate extern_take_value;
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();
assert!(a == b);
2013-08-30 22:06:11 +00:00
assert!(a != c);
}