mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 09:44:08 +00:00
28 lines
376 B
Rust
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);
|
|
}
|