]> git.proxmox.com Git - rustc.git/blob - src/test/ui/unwind-abis/feature-gate-thiscall-unwind.rs
Update unsuspicious file list
[rustc.git] / src / test / ui / unwind-abis / feature-gate-thiscall-unwind.rs
1 // gate-test-abi_thiscall
2 // gate-test-c_unwind
3 // needs-llvm-components: x86
4 // compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib
5 #![no_core]
6 #![feature(no_core, lang_items)]
7 #[lang="sized"]
8 trait Sized { }
9
10 // Test that the "thiscall-unwind" ABI is feature-gated, and cannot be used when
11 // the `c_unwind` feature gate is not used.
12
13 extern "thiscall-unwind" fn fu() {} //~ ERROR thiscall-unwind ABI is experimental
14 extern "thiscall" fn f() {} //~ ERROR thiscall is experimental
15
16 trait T {
17 extern "thiscall" fn m(); //~ ERROR thiscall is experimental
18 extern "thiscall-unwind" fn mu(); //~ ERROR thiscall-unwind ABI is experimental
19
20 extern "thiscall" fn dm() {} //~ ERROR thiscall is experimental
21 extern "thiscall-unwind" fn dmu() {} //~ ERROR thiscall-unwind ABI is experimental
22 }
23
24 struct S;
25 impl T for S {
26 extern "thiscall" fn m() {} //~ ERROR thiscall is experimental
27 extern "thiscall-unwind" fn mu() {} //~ ERROR thiscall-unwind ABI is experimental
28 }
29
30 impl S {
31 extern "thiscall" fn im() {} //~ ERROR thiscall is experimental
32 extern "thiscall-unwind" fn imu() {} //~ ERROR thiscall-unwind ABI is experimental
33 }
34
35 type TA = extern "thiscall" fn(); //~ ERROR thiscall is experimental
36 type TAU = extern "thiscall-unwind" fn(); //~ ERROR thiscall-unwind ABI is experimental
37
38 extern "thiscall" {} //~ ERROR thiscall is experimental
39 extern "thiscall-unwind" {} //~ ERROR thiscall-unwind ABI is experimental