rust/src/test/run-pass/extern-take-value.rs

16 lines
189 B
Rust
Raw Normal View History

2012-07-03 18:32:02 -05:00
extern fn f() {
}
2012-07-03 18:32:02 -05:00
extern fn g() {
}
fn main() {
2012-07-03 18:32:02 -05:00
// extern functions are *u8 types
let a: *u8 = f;
let b: *u8 = f;
let c: *u8 = g;
assert a == b;
assert a != c;
}