summaryrefslogtreecommitdiffstats
path: root/tests/ui/extern/extern-take-value.rs
blob: c09a774361f337cb2f792ac8f5f8501bed67e3b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// run-pass
// aux-build:extern-take-value.rs

extern crate extern_take_value;

pub fn main() {
    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);
    assert!(a != c);
}