]> git.proxmox.com Git - rustc.git/blame - src/test/ui/extern/extern-vectorcall.rs
New upstream version 1.55.0+dfsg1
[rustc.git] / src / test / ui / extern / extern-vectorcall.rs
CommitLineData
b7449926 1// run-pass
136023e0
XL
2// revisions: x64 x32
3// [x64]only-x86_64
4// [x32]only-i686
c30ab7b3 5
9cc50fc6 6#![feature(abi_vectorcall)]
85aaf69f 7
9cc50fc6
SL
8trait A {
9 extern "vectorcall" fn test1(i: i32);
10}
11
12struct S;
62682a34 13
9cc50fc6
SL
14impl A for S {
15 extern "vectorcall" fn test1(i: i32) {
16 assert_eq!(i, 1);
62682a34
SL
17 }
18}
19
9cc50fc6
SL
20extern "vectorcall" fn test2(i: i32) {
21 assert_eq!(i, 2);
62682a34 22}
223e47cc 23
9cc50fc6
SL
24fn main() {
25 <S as A>::test1(1);
26 test2(2);
27}