]> git.lizzy.rs Git - rust.git/blob - src/test/ui/feature-gates/feature-gate-abi-efiapi.rs
Limit efiapi calling convention to supported arches
[rust.git] / src / test / ui / feature-gates / feature-gate-abi-efiapi.rs
1 // needs-llvm-components: x86
2 // compile-flags: --target=x86_64-unknown-linux-gnu --crate-type=rlib
3 #![no_core]
4 #![feature(no_core, lang_items)]
5 #[lang="sized"]
6 trait Sized { }
7
8 // Functions
9 extern "efiapi" fn f1() {} //~ ERROR efiapi ABI is experimental
10
11 // Methods in trait defintion
12 trait Tr {
13     extern "efiapi" fn f2(); //~ ERROR efiapi ABI is experimental
14     extern "efiapi" fn f3() {} //~ ERROR efiapi ABI is experimental
15 }
16
17 struct S;
18
19 // Methods in trait impl
20 impl Tr for S {
21     extern "efiapi" fn f2() {} //~ ERROR efiapi ABI is experimental
22 }
23
24 // Methods in inherent impl
25 impl S {
26     extern "efiapi" fn f4() {} //~ ERROR efiapi ABI is experimental
27 }
28
29 // Function pointer types
30 type A = extern "efiapi" fn(); //~ ERROR efiapi ABI is experimental
31
32 // Foreign modules
33 extern "efiapi" {} //~ ERROR efiapi ABI is experimental