summaryrefslogtreecommitdiff
path: root/tests/ui/unwind-abis/feature-gate-stdcall-unwind.rs
blob: cfa8eb3cad04b13d7103f3fe9d201d9512b08ff2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// gate-test-c_unwind
// needs-llvm-components: x86
// compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib
#![no_core]
#![feature(no_core, lang_items)]
#[lang="sized"]
trait Sized { }

// Test that the "stdcall-unwind" ABI is feature-gated, and cannot be used when
// the `c_unwind` feature gate is not used.

extern "stdcall-unwind" fn fu() {} //~ ERROR stdcall-unwind ABI is experimental

trait T {
    extern "stdcall-unwind" fn mu(); //~ ERROR stdcall-unwind ABI is experimental
    extern "stdcall-unwind" fn dmu() {} //~ ERROR stdcall-unwind ABI is experimental
}

struct S;
impl T for S {
    extern "stdcall-unwind" fn mu() {} //~ ERROR stdcall-unwind ABI is experimental
}

impl S {
    extern "stdcall-unwind" fn imu() {} //~ ERROR stdcall-unwind ABI is experimental
}

type TAU = extern "stdcall-unwind" fn(); //~ ERROR stdcall-unwind ABI is experimental

extern "stdcall-unwind" {} //~ ERROR stdcall-unwind ABI is experimental