]> git.lizzy.rs Git - rust.git/blob - src/test/ui/unwind-abis/feature-gate-stdcall-unwind.rs
Test `expect` with `forbid` and fix doc errors (RFC-2383)
[rust.git] / src / test / ui / unwind-abis / feature-gate-stdcall-unwind.rs
1 // gate-test-c_unwind
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 "stdcall-unwind" ABI is feature-gated, and cannot be used when
10 // the `c_unwind` feature gate is not used.
11
12 extern "stdcall-unwind" fn fu() {} //~ ERROR stdcall-unwind ABI is experimental
13
14 trait T {
15     extern "stdcall-unwind" fn mu(); //~ ERROR stdcall-unwind ABI is experimental
16     extern "stdcall-unwind" fn dmu() {} //~ ERROR stdcall-unwind ABI is experimental
17 }
18
19 struct S;
20 impl T for S {
21     extern "stdcall-unwind" fn mu() {} //~ ERROR stdcall-unwind ABI is experimental
22 }
23
24 impl S {
25     extern "stdcall-unwind" fn imu() {} //~ ERROR stdcall-unwind ABI is experimental
26 }
27
28 type TAU = extern "stdcall-unwind" fn(); //~ ERROR stdcall-unwind ABI is experimental
29
30 extern "stdcall-unwind" {} //~ ERROR stdcall-unwind ABI is experimental