]> git.lizzy.rs Git - rust.git/blob - src/test/ui/feature-gates/feature-gate-vectorcall.rs
parser will not give wrong help message for 'public'
[rust.git] / src / test / ui / feature-gates / feature-gate-vectorcall.rs
1 // gate-test-abi_vectorcall
2 // needs-llvm-components: x86
3 // compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib
4 #![no_core]
5 #![feature(no_core, lang_items)]
6 #[lang="sized"]
7 trait Sized { }
8
9 // Test that the "vectorcall-unwind" ABI is feature-gated, and cannot be used when
10 // the `c_unwind` feature gate is not used.
11
12 extern "vectorcall" fn f() {} //~ ERROR vectorcall is experimental
13
14 trait T {
15     extern "vectorcall" fn m(); //~ ERROR vectorcall is experimental
16
17     extern "vectorcall" fn dm() {} //~ ERROR vectorcall is experimental
18 }
19
20 struct S;
21 impl T for S {
22     extern "vectorcall" fn m() {} //~ ERROR vectorcall is experimental
23 }
24
25 impl S {
26     extern "vectorcall" fn im() {} //~ ERROR vectorcall is experimental
27 }
28
29 type TA = extern "vectorcall" fn(); //~ ERROR vectorcall is experimental
30
31 extern "vectorcall" {} //~ ERROR vectorcall is experimental