2018-08-30 14:18:55 +02:00
|
|
|
// run-pass
|
2021-06-11 14:22:13 +03:00
|
|
|
// only-i686
|
2017-05-17 09:40:46 -04:00
|
|
|
|
|
|
|
#![feature(abi_thiscall)]
|
|
|
|
|
|
|
|
trait A {
|
|
|
|
extern "thiscall" fn test1(i: i32);
|
|
|
|
}
|
|
|
|
|
|
|
|
struct S;
|
|
|
|
|
|
|
|
impl A for S {
|
|
|
|
extern "thiscall" fn test1(i: i32) {
|
|
|
|
assert_eq!(i, 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
extern "thiscall" fn test2(i: i32) {
|
|
|
|
assert_eq!(i, 2);
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
<S as A>::test1(1);
|
|
|
|
test2(2);
|
|
|
|
}
|