rust/tests/ui/extern/extern-thiscall.rs
2023-08-07 14:11:03 +02:00

24 lines
294 B
Rust

// run-pass
// only-x86
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);
}