]>
Commit | Line | Data |
---|---|---|
32a655c1 SL |
1 | // gate-test-intrinsics |
2 | // gate-test-platform_intrinsics | |
e74abb32 | 3 | // gate-test-abi_efiapi |
136023e0 XL |
4 | // compile-flags: --crate-type=rlib |
5 | ||
6 | #![feature(no_core, lang_items)] | |
7 | #![no_core] | |
8 | ||
9 | #[lang="sized"] | |
10 | trait Sized { } | |
32a655c1 | 11 | |
5bcae85e SL |
12 | // Functions |
13 | extern "rust-intrinsic" fn f1() {} //~ ERROR intrinsics are subject to change | |
cdc7bbd5 | 14 | //~^ ERROR intrinsic must be in |
5bcae85e | 15 | extern "platform-intrinsic" fn f2() {} //~ ERROR platform intrinsics are experimental |
cdc7bbd5 | 16 | //~^ ERROR intrinsic must be in |
fc512014 | 17 | extern "rust-call" fn f4(_: ()) {} //~ ERROR rust-call ABI is subject to change |
e74abb32 | 18 | extern "efiapi" fn f10() {} //~ ERROR efiapi ABI is experimental and subject to change |
5bcae85e SL |
19 | |
20 | // Methods in trait definition | |
21 | trait Tr { | |
22 | extern "rust-intrinsic" fn m1(); //~ ERROR intrinsics are subject to change | |
cdc7bbd5 | 23 | //~^ ERROR intrinsic must be in |
5bcae85e | 24 | extern "platform-intrinsic" fn m2(); //~ ERROR platform intrinsics are experimental |
cdc7bbd5 | 25 | //~^ ERROR intrinsic must be in |
fc512014 | 26 | extern "rust-call" fn m4(_: ()); //~ ERROR rust-call ABI is subject to change |
e74abb32 | 27 | extern "efiapi" fn m10(); //~ ERROR efiapi ABI is experimental and subject to change |
5bcae85e | 28 | |
fc512014 | 29 | extern "rust-call" fn dm4(_: ()) {} //~ ERROR rust-call ABI is subject to change |
e74abb32 | 30 | extern "efiapi" fn dm10() {} //~ ERROR efiapi ABI is experimental and subject to change |
5bcae85e SL |
31 | } |
32 | ||
33 | struct S; | |
34 | ||
35 | // Methods in trait impl | |
36 | impl Tr for S { | |
37 | extern "rust-intrinsic" fn m1() {} //~ ERROR intrinsics are subject to change | |
cdc7bbd5 | 38 | //~^ ERROR intrinsic must be in |
5bcae85e | 39 | extern "platform-intrinsic" fn m2() {} //~ ERROR platform intrinsics are experimental |
cdc7bbd5 | 40 | //~^ ERROR intrinsic must be in |
fc512014 | 41 | extern "rust-call" fn m4(_: ()) {} //~ ERROR rust-call ABI is subject to change |
e74abb32 | 42 | extern "efiapi" fn m10() {} //~ ERROR efiapi ABI is experimental and subject to change |
5bcae85e SL |
43 | } |
44 | ||
45 | // Methods in inherent impl | |
46 | impl S { | |
47 | extern "rust-intrinsic" fn im1() {} //~ ERROR intrinsics are subject to change | |
cdc7bbd5 | 48 | //~^ ERROR intrinsic must be in |
5bcae85e | 49 | extern "platform-intrinsic" fn im2() {} //~ ERROR platform intrinsics are experimental |
cdc7bbd5 | 50 | //~^ ERROR intrinsic must be in |
fc512014 | 51 | extern "rust-call" fn im4(_: ()) {} //~ ERROR rust-call ABI is subject to change |
e74abb32 | 52 | extern "efiapi" fn im10() {} //~ ERROR efiapi ABI is experimental and subject to change |
5bcae85e SL |
53 | } |
54 | ||
55 | // Function pointer types | |
56 | type A1 = extern "rust-intrinsic" fn(); //~ ERROR intrinsics are subject to change | |
57 | type A2 = extern "platform-intrinsic" fn(); //~ ERROR platform intrinsics are experimental | |
fc512014 | 58 | type A4 = extern "rust-call" fn(_: ()); //~ ERROR rust-call ABI is subject to change |
e74abb32 | 59 | type A10 = extern "efiapi" fn(); //~ ERROR efiapi ABI is experimental and subject to change |
5bcae85e SL |
60 | |
61 | // Foreign modules | |
62 | extern "rust-intrinsic" {} //~ ERROR intrinsics are subject to change | |
63 | extern "platform-intrinsic" {} //~ ERROR platform intrinsics are experimental | |
5bcae85e | 64 | extern "rust-call" {} //~ ERROR rust-call ABI is subject to change |
e74abb32 | 65 | extern "efiapi" {} //~ ERROR efiapi ABI is experimental and subject to change |