]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/unwind-abis/feature-gate-stdcall-unwind.rs
New upstream version 1.55.0+dfsg1
[rustc.git] / src / test / ui / unwind-abis / feature-gate-stdcall-unwind.rs
index 7d4dc8c9343f1c5af01b1dba7e98c68ed5597d84..cfa8eb3cad04b13d7103f3fe9d201d9512b08ff2 100644 (file)
@@ -1,13 +1,30 @@
-// ignore-arm stdcall isn't supported
-// ignore-aarch64 stdcall isn't supported
-// ignore-riscv64 stdcall isn't supported
+// 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 f() {}
-//~^ ERROR stdcall-unwind ABI is experimental and subject to change [E0658]
+extern "stdcall-unwind" fn fu() {} //~ ERROR stdcall-unwind ABI is experimental
 
-fn main() {
-    f();
+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