rust/tests/ui/extern/extern-vectorcall.rs
2023-01-11 09:32:08 +00:00

28 lines
376 B
Rust

// run-pass
// revisions: x64 x32
// [x64]only-x86_64
// [x32]only-x86
#![feature(abi_vectorcall)]
trait A {
extern "vectorcall" fn test1(i: i32);
}
struct S;
impl A for S {
extern "vectorcall" fn test1(i: i32) {
assert_eq!(i, 1);
}
}
extern "vectorcall" fn test2(i: i32) {
assert_eq!(i, 2);
}
fn main() {
<S as A>::test1(1);
test2(2);
}