summaryrefslogtreecommitdiffstats
path: root/src/test/ui/unwind-abis
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
commit218caa410aa38c29984be31a5229b9fa717560ee (patch)
treec54bd55eeb6e4c508940a30e94c0032fbd45d677 /src/test/ui/unwind-abis
parentReleasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz
rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/unwind-abis')
-rw-r--r--src/test/ui/unwind-abis/feature-gate-c-unwind-enabled.rs12
-rw-r--r--src/test/ui/unwind-abis/feature-gate-c-unwind.rs13
-rw-r--r--src/test/ui/unwind-abis/feature-gate-c-unwind.stderr33
-rw-r--r--src/test/ui/unwind-abis/feature-gate-stdcall-unwind.rs30
-rw-r--r--src/test/ui/unwind-abis/feature-gate-stdcall-unwind.stderr66
-rw-r--r--src/test/ui/unwind-abis/feature-gate-system-unwind.rs9
-rw-r--r--src/test/ui/unwind-abis/feature-gate-system-unwind.stderr12
-rw-r--r--src/test/ui/unwind-abis/feature-gate-thiscall-unwind.rs39
-rw-r--r--src/test/ui/unwind-abis/feature-gate-thiscall-unwind.stderr122
-rw-r--r--src/test/ui/unwind-abis/ffi-unwind-calls-lint.rs26
-rw-r--r--src/test/ui/unwind-abis/ffi-unwind-calls-lint.stderr20
11 files changed, 0 insertions, 382 deletions
diff --git a/src/test/ui/unwind-abis/feature-gate-c-unwind-enabled.rs b/src/test/ui/unwind-abis/feature-gate-c-unwind-enabled.rs
deleted file mode 100644
index 6ff5dbda2..000000000
--- a/src/test/ui/unwind-abis/feature-gate-c-unwind-enabled.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-// Test that the "C-unwind" ABI is feature-gated, and *can* be used when the
-// `c_unwind` feature gate is enabled.
-
-// check-pass
-
-#![feature(c_unwind)]
-
-extern "C-unwind" fn f() {}
-
-fn main() {
- f();
-}
diff --git a/src/test/ui/unwind-abis/feature-gate-c-unwind.rs b/src/test/ui/unwind-abis/feature-gate-c-unwind.rs
deleted file mode 100644
index ba72f74f2..000000000
--- a/src/test/ui/unwind-abis/feature-gate-c-unwind.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// Test that the "C-unwind" ABI is feature-gated, and cannot be used when the
-// `c_unwind` feature gate is not used.
-
-#![allow(ffi_unwind_calls)]
-//~^ WARNING unknown lint: `ffi_unwind_calls`
-//~| WARNING unknown lint: `ffi_unwind_calls`
-
-extern "C-unwind" fn f() {}
-//~^ ERROR C-unwind ABI is experimental and subject to change [E0658]
-
-fn main() {
- f();
-}
diff --git a/src/test/ui/unwind-abis/feature-gate-c-unwind.stderr b/src/test/ui/unwind-abis/feature-gate-c-unwind.stderr
deleted file mode 100644
index 214ddc45c..000000000
--- a/src/test/ui/unwind-abis/feature-gate-c-unwind.stderr
+++ /dev/null
@@ -1,33 +0,0 @@
-warning: unknown lint: `ffi_unwind_calls`
- --> $DIR/feature-gate-c-unwind.rs:4:1
- |
-LL | #![allow(ffi_unwind_calls)]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = note: the `ffi_unwind_calls` lint is unstable
- = note: see issue #74990 <https://github.com/rust-lang/rust/issues/74990> for more information
- = help: add `#![feature(c_unwind)]` to the crate attributes to enable
- = note: `#[warn(unknown_lints)]` on by default
-
-error[E0658]: C-unwind ABI is experimental and subject to change
- --> $DIR/feature-gate-c-unwind.rs:8:8
- |
-LL | extern "C-unwind" fn f() {}
- | ^^^^^^^^^^
- |
- = note: see issue #74990 <https://github.com/rust-lang/rust/issues/74990> for more information
- = help: add `#![feature(c_unwind)]` to the crate attributes to enable
-
-warning: unknown lint: `ffi_unwind_calls`
- --> $DIR/feature-gate-c-unwind.rs:4:1
- |
-LL | #![allow(ffi_unwind_calls)]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = note: the `ffi_unwind_calls` lint is unstable
- = note: see issue #74990 <https://github.com/rust-lang/rust/issues/74990> for more information
- = help: add `#![feature(c_unwind)]` to the crate attributes to enable
-
-error: aborting due to previous error; 2 warnings emitted
-
-For more information about this error, try `rustc --explain E0658`.
diff --git a/src/test/ui/unwind-abis/feature-gate-stdcall-unwind.rs b/src/test/ui/unwind-abis/feature-gate-stdcall-unwind.rs
deleted file mode 100644
index cfa8eb3ca..000000000
--- a/src/test/ui/unwind-abis/feature-gate-stdcall-unwind.rs
+++ /dev/null
@@ -1,30 +0,0 @@
-// 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
diff --git a/src/test/ui/unwind-abis/feature-gate-stdcall-unwind.stderr b/src/test/ui/unwind-abis/feature-gate-stdcall-unwind.stderr
deleted file mode 100644
index c2cce0e11..000000000
--- a/src/test/ui/unwind-abis/feature-gate-stdcall-unwind.stderr
+++ /dev/null
@@ -1,66 +0,0 @@
-error[E0658]: stdcall-unwind ABI is experimental and subject to change
- --> $DIR/feature-gate-stdcall-unwind.rs:12:8
- |
-LL | extern "stdcall-unwind" fn fu() {}
- | ^^^^^^^^^^^^^^^^
- |
- = note: see issue #74990 <https://github.com/rust-lang/rust/issues/74990> for more information
- = help: add `#![feature(c_unwind)]` to the crate attributes to enable
-
-error[E0658]: stdcall-unwind ABI is experimental and subject to change
- --> $DIR/feature-gate-stdcall-unwind.rs:15:12
- |
-LL | extern "stdcall-unwind" fn mu();
- | ^^^^^^^^^^^^^^^^
- |
- = note: see issue #74990 <https://github.com/rust-lang/rust/issues/74990> for more information
- = help: add `#![feature(c_unwind)]` to the crate attributes to enable
-
-error[E0658]: stdcall-unwind ABI is experimental and subject to change
- --> $DIR/feature-gate-stdcall-unwind.rs:16:12
- |
-LL | extern "stdcall-unwind" fn dmu() {}
- | ^^^^^^^^^^^^^^^^
- |
- = note: see issue #74990 <https://github.com/rust-lang/rust/issues/74990> for more information
- = help: add `#![feature(c_unwind)]` to the crate attributes to enable
-
-error[E0658]: stdcall-unwind ABI is experimental and subject to change
- --> $DIR/feature-gate-stdcall-unwind.rs:21:12
- |
-LL | extern "stdcall-unwind" fn mu() {}
- | ^^^^^^^^^^^^^^^^
- |
- = note: see issue #74990 <https://github.com/rust-lang/rust/issues/74990> for more information
- = help: add `#![feature(c_unwind)]` to the crate attributes to enable
-
-error[E0658]: stdcall-unwind ABI is experimental and subject to change
- --> $DIR/feature-gate-stdcall-unwind.rs:25:12
- |
-LL | extern "stdcall-unwind" fn imu() {}
- | ^^^^^^^^^^^^^^^^
- |
- = note: see issue #74990 <https://github.com/rust-lang/rust/issues/74990> for more information
- = help: add `#![feature(c_unwind)]` to the crate attributes to enable
-
-error[E0658]: stdcall-unwind ABI is experimental and subject to change
- --> $DIR/feature-gate-stdcall-unwind.rs:28:19
- |
-LL | type TAU = extern "stdcall-unwind" fn();
- | ^^^^^^^^^^^^^^^^
- |
- = note: see issue #74990 <https://github.com/rust-lang/rust/issues/74990> for more information
- = help: add `#![feature(c_unwind)]` to the crate attributes to enable
-
-error[E0658]: stdcall-unwind ABI is experimental and subject to change
- --> $DIR/feature-gate-stdcall-unwind.rs:30:8
- |
-LL | extern "stdcall-unwind" {}
- | ^^^^^^^^^^^^^^^^
- |
- = note: see issue #74990 <https://github.com/rust-lang/rust/issues/74990> for more information
- = help: add `#![feature(c_unwind)]` to the crate attributes to enable
-
-error: aborting due to 7 previous errors
-
-For more information about this error, try `rustc --explain E0658`.
diff --git a/src/test/ui/unwind-abis/feature-gate-system-unwind.rs b/src/test/ui/unwind-abis/feature-gate-system-unwind.rs
deleted file mode 100644
index 26c2de4e8..000000000
--- a/src/test/ui/unwind-abis/feature-gate-system-unwind.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-// Test that the "system-unwind" ABI is feature-gated, and cannot be used when
-// the `c_unwind` feature gate is not used.
-
-extern "system-unwind" fn f() {}
-//~^ ERROR system-unwind ABI is experimental and subject to change [E0658]
-
-fn main() {
- f();
-}
diff --git a/src/test/ui/unwind-abis/feature-gate-system-unwind.stderr b/src/test/ui/unwind-abis/feature-gate-system-unwind.stderr
deleted file mode 100644
index 878773364..000000000
--- a/src/test/ui/unwind-abis/feature-gate-system-unwind.stderr
+++ /dev/null
@@ -1,12 +0,0 @@
-error[E0658]: system-unwind ABI is experimental and subject to change
- --> $DIR/feature-gate-system-unwind.rs:4:8
- |
-LL | extern "system-unwind" fn f() {}
- | ^^^^^^^^^^^^^^^
- |
- = note: see issue #74990 <https://github.com/rust-lang/rust/issues/74990> for more information
- = help: add `#![feature(c_unwind)]` to the crate attributes to enable
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0658`.
diff --git a/src/test/ui/unwind-abis/feature-gate-thiscall-unwind.rs b/src/test/ui/unwind-abis/feature-gate-thiscall-unwind.rs
deleted file mode 100644
index 0a323e50f..000000000
--- a/src/test/ui/unwind-abis/feature-gate-thiscall-unwind.rs
+++ /dev/null
@@ -1,39 +0,0 @@
-// gate-test-abi_thiscall
-// 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 "thiscall-unwind" ABI is feature-gated, and cannot be used when
-// the `c_unwind` feature gate is not used.
-
-extern "thiscall-unwind" fn fu() {} //~ ERROR thiscall-unwind ABI is experimental
-extern "thiscall" fn f() {} //~ ERROR thiscall is experimental
-
-trait T {
- extern "thiscall" fn m(); //~ ERROR thiscall is experimental
- extern "thiscall-unwind" fn mu(); //~ ERROR thiscall-unwind ABI is experimental
-
- extern "thiscall" fn dm() {} //~ ERROR thiscall is experimental
- extern "thiscall-unwind" fn dmu() {} //~ ERROR thiscall-unwind ABI is experimental
-}
-
-struct S;
-impl T for S {
- extern "thiscall" fn m() {} //~ ERROR thiscall is experimental
- extern "thiscall-unwind" fn mu() {} //~ ERROR thiscall-unwind ABI is experimental
-}
-
-impl S {
- extern "thiscall" fn im() {} //~ ERROR thiscall is experimental
- extern "thiscall-unwind" fn imu() {} //~ ERROR thiscall-unwind ABI is experimental
-}
-
-type TA = extern "thiscall" fn(); //~ ERROR thiscall is experimental
-type TAU = extern "thiscall-unwind" fn(); //~ ERROR thiscall-unwind ABI is experimental
-
-extern "thiscall" {} //~ ERROR thiscall is experimental
-extern "thiscall-unwind" {} //~ ERROR thiscall-unwind ABI is experimental
diff --git a/src/test/ui/unwind-abis/feature-gate-thiscall-unwind.stderr b/src/test/ui/unwind-abis/feature-gate-thiscall-unwind.stderr
deleted file mode 100644
index 9ca00a55c..000000000
--- a/src/test/ui/unwind-abis/feature-gate-thiscall-unwind.stderr
+++ /dev/null
@@ -1,122 +0,0 @@
-error[E0658]: thiscall-unwind ABI is experimental and subject to change
- --> $DIR/feature-gate-thiscall-unwind.rs:13:8
- |
-LL | extern "thiscall-unwind" fn fu() {}
- | ^^^^^^^^^^^^^^^^^
- |
- = note: see issue #74990 <https://github.com/rust-lang/rust/issues/74990> for more information
- = help: add `#![feature(c_unwind)]` to the crate attributes to enable
-
-error[E0658]: thiscall is experimental and subject to change
- --> $DIR/feature-gate-thiscall-unwind.rs:14:8
- |
-LL | extern "thiscall" fn f() {}
- | ^^^^^^^^^^
- |
- = help: add `#![feature(abi_thiscall)]` to the crate attributes to enable
-
-error[E0658]: thiscall is experimental and subject to change
- --> $DIR/feature-gate-thiscall-unwind.rs:17:12
- |
-LL | extern "thiscall" fn m();
- | ^^^^^^^^^^
- |
- = help: add `#![feature(abi_thiscall)]` to the crate attributes to enable
-
-error[E0658]: thiscall-unwind ABI is experimental and subject to change
- --> $DIR/feature-gate-thiscall-unwind.rs:18:12
- |
-LL | extern "thiscall-unwind" fn mu();
- | ^^^^^^^^^^^^^^^^^
- |
- = note: see issue #74990 <https://github.com/rust-lang/rust/issues/74990> for more information
- = help: add `#![feature(c_unwind)]` to the crate attributes to enable
-
-error[E0658]: thiscall is experimental and subject to change
- --> $DIR/feature-gate-thiscall-unwind.rs:20:12
- |
-LL | extern "thiscall" fn dm() {}
- | ^^^^^^^^^^
- |
- = help: add `#![feature(abi_thiscall)]` to the crate attributes to enable
-
-error[E0658]: thiscall-unwind ABI is experimental and subject to change
- --> $DIR/feature-gate-thiscall-unwind.rs:21:12
- |
-LL | extern "thiscall-unwind" fn dmu() {}
- | ^^^^^^^^^^^^^^^^^
- |
- = note: see issue #74990 <https://github.com/rust-lang/rust/issues/74990> for more information
- = help: add `#![feature(c_unwind)]` to the crate attributes to enable
-
-error[E0658]: thiscall is experimental and subject to change
- --> $DIR/feature-gate-thiscall-unwind.rs:26:12
- |
-LL | extern "thiscall" fn m() {}
- | ^^^^^^^^^^
- |
- = help: add `#![feature(abi_thiscall)]` to the crate attributes to enable
-
-error[E0658]: thiscall-unwind ABI is experimental and subject to change
- --> $DIR/feature-gate-thiscall-unwind.rs:27:12
- |
-LL | extern "thiscall-unwind" fn mu() {}
- | ^^^^^^^^^^^^^^^^^
- |
- = note: see issue #74990 <https://github.com/rust-lang/rust/issues/74990> for more information
- = help: add `#![feature(c_unwind)]` to the crate attributes to enable
-
-error[E0658]: thiscall is experimental and subject to change
- --> $DIR/feature-gate-thiscall-unwind.rs:31:12
- |
-LL | extern "thiscall" fn im() {}
- | ^^^^^^^^^^
- |
- = help: add `#![feature(abi_thiscall)]` to the crate attributes to enable
-
-error[E0658]: thiscall-unwind ABI is experimental and subject to change
- --> $DIR/feature-gate-thiscall-unwind.rs:32:12
- |
-LL | extern "thiscall-unwind" fn imu() {}
- | ^^^^^^^^^^^^^^^^^
- |
- = note: see issue #74990 <https://github.com/rust-lang/rust/issues/74990> for more information
- = help: add `#![feature(c_unwind)]` to the crate attributes to enable
-
-error[E0658]: thiscall is experimental and subject to change
- --> $DIR/feature-gate-thiscall-unwind.rs:35:18
- |
-LL | type TA = extern "thiscall" fn();
- | ^^^^^^^^^^
- |
- = help: add `#![feature(abi_thiscall)]` to the crate attributes to enable
-
-error[E0658]: thiscall-unwind ABI is experimental and subject to change
- --> $DIR/feature-gate-thiscall-unwind.rs:36:19
- |
-LL | type TAU = extern "thiscall-unwind" fn();
- | ^^^^^^^^^^^^^^^^^
- |
- = note: see issue #74990 <https://github.com/rust-lang/rust/issues/74990> for more information
- = help: add `#![feature(c_unwind)]` to the crate attributes to enable
-
-error[E0658]: thiscall is experimental and subject to change
- --> $DIR/feature-gate-thiscall-unwind.rs:38:8
- |
-LL | extern "thiscall" {}
- | ^^^^^^^^^^
- |
- = help: add `#![feature(abi_thiscall)]` to the crate attributes to enable
-
-error[E0658]: thiscall-unwind ABI is experimental and subject to change
- --> $DIR/feature-gate-thiscall-unwind.rs:39:8
- |
-LL | extern "thiscall-unwind" {}
- | ^^^^^^^^^^^^^^^^^
- |
- = note: see issue #74990 <https://github.com/rust-lang/rust/issues/74990> for more information
- = help: add `#![feature(c_unwind)]` to the crate attributes to enable
-
-error: aborting due to 14 previous errors
-
-For more information about this error, try `rustc --explain E0658`.
diff --git a/src/test/ui/unwind-abis/ffi-unwind-calls-lint.rs b/src/test/ui/unwind-abis/ffi-unwind-calls-lint.rs
deleted file mode 100644
index 9a324f004..000000000
--- a/src/test/ui/unwind-abis/ffi-unwind-calls-lint.rs
+++ /dev/null
@@ -1,26 +0,0 @@
-// build-pass
-// needs-unwind
-
-#![feature(c_unwind)]
-#![warn(ffi_unwind_calls)]
-
-mod foo {
- #[no_mangle]
- pub extern "C-unwind" fn foo() {}
-}
-
-extern "C-unwind" {
- fn foo();
-}
-
-fn main() {
- // Call to Rust function is fine.
- foo::foo();
- // Call to foreign function should warn.
- unsafe { foo(); }
- //~^ WARNING call to foreign function with FFI-unwind ABI
- let ptr: extern "C-unwind" fn() = foo::foo;
- // Call to function pointer should also warn.
- ptr();
- //~^ WARNING call to function pointer with FFI-unwind ABI
-}
diff --git a/src/test/ui/unwind-abis/ffi-unwind-calls-lint.stderr b/src/test/ui/unwind-abis/ffi-unwind-calls-lint.stderr
deleted file mode 100644
index 937a2b3df..000000000
--- a/src/test/ui/unwind-abis/ffi-unwind-calls-lint.stderr
+++ /dev/null
@@ -1,20 +0,0 @@
-warning: call to foreign function with FFI-unwind ABI
- --> $DIR/ffi-unwind-calls-lint.rs:20:14
- |
-LL | unsafe { foo(); }
- | ^^^^^ call to foreign function with FFI-unwind ABI
- |
-note: the lint level is defined here
- --> $DIR/ffi-unwind-calls-lint.rs:5:9
- |
-LL | #![warn(ffi_unwind_calls)]
- | ^^^^^^^^^^^^^^^^
-
-warning: call to function pointer with FFI-unwind ABI
- --> $DIR/ffi-unwind-calls-lint.rs:24:5
- |
-LL | ptr();
- | ^^^^^ call to function pointer with FFI-unwind ABI
-
-warning: 2 warnings emitted
-