]> git.lizzy.rs Git - rust.git/blob - tests/ui/extern/extern-thiscall.rs
Merge commit '7f27e2e74ef957baa382dc05cf08df6368165c74' into clippyup
[rust.git] / tests / 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 }