2018-08-30 07:18:55 -05:00
|
|
|
// run-pass
|
2021-11-04 09:30:23 -05:00
|
|
|
// only-x86
|
2016-10-25 12:56:36 -05:00
|
|
|
|
2015-04-18 00:12:20 -05:00
|
|
|
trait A {
|
2015-02-19 14:26:13 -06:00
|
|
|
extern "fastcall" fn test1(i: i32);
|
2020-09-01 16:28:11 -05:00
|
|
|
extern "C" fn test2(i: i32);
|
2015-02-19 14:26:13 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
struct S;
|
|
|
|
impl S {
|
|
|
|
extern "stdcall" fn test3(i: i32) {
|
|
|
|
assert_eq!(i, 3);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl A for S {
|
|
|
|
extern "fastcall" fn test1(i: i32) {
|
|
|
|
assert_eq!(i, 1);
|
|
|
|
}
|
2020-09-01 16:28:11 -05:00
|
|
|
extern "C" fn test2(i: i32) {
|
2015-02-19 14:26:13 -06:00
|
|
|
assert_eq!(i, 2);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
<S as A>::test1(1);
|
|
|
|
<S as A>::test2(2);
|
|
|
|
S::test3(3);
|
|
|
|
}
|