]> git.lizzy.rs Git - rust.git/blob - src/test/ui/extern/extern-thiscall.rs
Rollup merge of #97317 - GuillaumeGomez:gui-settings-text-click, r=jsha
[rust.git] / src / test / ui / extern / extern-thiscall.rs
1 // run-pass
2 // only-x86
3
4 #![feature(abi_thiscall)]
5
6 trait A {
7     extern "thiscall" fn test1(i: i32);
8 }
9
10 struct S;
11
12 impl A for S {
13     extern "thiscall" fn test1(i: i32) {
14         assert_eq!(i, 1);
15     }
16 }
17
18 extern "thiscall" fn test2(i: i32) {
19     assert_eq!(i, 2);
20 }
21
22 fn main() {
23     <S as A>::test1(1);
24     test2(2);
25 }