2018-08-30 07:18:55 -05:00
|
|
|
//@ run-pass
|
2016-03-06 06:17:53 -06:00
|
|
|
// We used to have a __rust_abi shim that resulted in duplicated symbols
|
|
|
|
// whenever the item path wasn't enough to disambiguate between them.
|
|
|
|
fn main() {
|
|
|
|
let a = {
|
2020-09-01 16:28:11 -05:00
|
|
|
extern "C" fn good() -> i32 { return 0; }
|
|
|
|
good as extern "C" fn() -> i32
|
2016-03-06 06:17:53 -06:00
|
|
|
};
|
|
|
|
let b = {
|
2020-09-01 16:28:11 -05:00
|
|
|
extern "C" fn good() -> i32 { return 5; }
|
|
|
|
good as extern "C" fn() -> i32
|
2016-03-06 06:17:53 -06:00
|
|
|
};
|
|
|
|
|
|
|
|
assert!(a != b);
|
|
|
|
assert_eq!((a(), b()), (0, 5));
|
|
|
|
}
|