summaryrefslogtreecommitdiffstats
path: root/tests/ui/unwind-abis
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:42 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:42 +0000
commit837b550238aa671a591ccf282dddeab29cadb206 (patch)
tree914b6b8862bace72bd3245ca184d374b08d8a672 /tests/ui/unwind-abis
parentAdding debian version 1.70.0+dfsg2-1. (diff)
downloadrustc-837b550238aa671a591ccf282dddeab29cadb206.tar.xz
rustc-837b550238aa671a591ccf282dddeab29cadb206.zip
Merging upstream version 1.71.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/unwind-abis')
-rw-r--r--tests/ui/unwind-abis/feature-gate-c-unwind-enabled.rs12
-rw-r--r--tests/ui/unwind-abis/feature-gate-c-unwind.rs13
-rw-r--r--tests/ui/unwind-abis/feature-gate-c-unwind.stderr33
-rw-r--r--tests/ui/unwind-abis/feature-gate-c_unwind.rs4
-rw-r--r--tests/ui/unwind-abis/feature-gate-stdcall-unwind.rs30
-rw-r--r--tests/ui/unwind-abis/feature-gate-stdcall-unwind.stderr66
-rw-r--r--tests/ui/unwind-abis/feature-gate-system-unwind.rs9
-rw-r--r--tests/ui/unwind-abis/feature-gate-system-unwind.stderr12
-rw-r--r--tests/ui/unwind-abis/feature-gate-thiscall-unwind.rs39
-rw-r--r--tests/ui/unwind-abis/feature-gate-thiscall-unwind.stderr122
-rw-r--r--tests/ui/unwind-abis/ffi-unwind-calls-lint.rs1
-rw-r--r--tests/ui/unwind-abis/ffi-unwind-calls-lint.stderr6
12 files changed, 7 insertions, 340 deletions
diff --git a/tests/ui/unwind-abis/feature-gate-c-unwind-enabled.rs b/tests/ui/unwind-abis/feature-gate-c-unwind-enabled.rs
deleted file mode 100644
index 6ff5dbda2..000000000
--- a/tests/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/tests/ui/unwind-abis/feature-gate-c-unwind.rs b/tests/ui/unwind-abis/feature-gate-c-unwind.rs
deleted file mode 100644
index ba72f74f2..000000000
--- a/tests/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/tests/ui/unwind-abis/feature-gate-c-unwind.stderr b/tests/ui/unwind-abis/feature-gate-c-unwind.stderr
deleted file mode 100644
index 214ddc45c..000000000
--- a/tests/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/tests/ui/unwind-abis/feature-gate-c_unwind.rs b/tests/ui/unwind-abis/feature-gate-c_unwind.rs
new file mode 100644
index 000000000..d73fe3e0b
--- /dev/null
+++ b/tests/ui/unwind-abis/feature-gate-c_unwind.rs
@@ -0,0 +1,4 @@
+// ignore-test
+
+// After partial stabilisation, `c_unwind` only contains codegen behaviour changes
+// and are tested in `src/test/codegen/unwind-abis`
diff --git a/tests/ui/unwind-abis/feature-gate-stdcall-unwind.rs b/tests/ui/unwind-abis/feature-gate-stdcall-unwind.rs
deleted file mode 100644
index cfa8eb3ca..000000000
--- a/tests/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/tests/ui/unwind-abis/feature-gate-stdcall-unwind.stderr b/tests/ui/unwind-abis/feature-gate-stdcall-unwind.stderr
deleted file mode 100644
index c2cce0e11..000000000
--- a/tests/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/tests/ui/unwind-abis/feature-gate-system-unwind.rs b/tests/ui/unwind-abis/feature-gate-system-unwind.rs
deleted file mode 100644
index 26c2de4e8..000000000
--- a/tests/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/tests/ui/unwind-abis/feature-gate-system-unwind.stderr b/tests/ui/unwind-abis/feature-gate-system-unwind.stderr
deleted file mode 100644
index 878773364..000000000
--- a/tests/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/tests/ui/unwind-abis/feature-gate-thiscall-unwind.rs b/tests/ui/unwind-abis/feature-gate-thiscall-unwind.rs
deleted file mode 100644
index 0a323e50f..000000000
--- a/tests/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/tests/ui/unwind-abis/feature-gate-thiscall-unwind.stderr b/tests/ui/unwind-abis/feature-gate-thiscall-unwind.stderr
deleted file mode 100644
index 9ca00a55c..000000000
--- a/tests/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/tests/ui/unwind-abis/ffi-unwind-calls-lint.rs b/tests/ui/unwind-abis/ffi-unwind-calls-lint.rs
index 9a324f004..8f0007376 100644
--- a/tests/ui/unwind-abis/ffi-unwind-calls-lint.rs
+++ b/tests/ui/unwind-abis/ffi-unwind-calls-lint.rs
@@ -1,7 +1,6 @@
// build-pass
// needs-unwind
-#![feature(c_unwind)]
#![warn(ffi_unwind_calls)]
mod foo {
diff --git a/tests/ui/unwind-abis/ffi-unwind-calls-lint.stderr b/tests/ui/unwind-abis/ffi-unwind-calls-lint.stderr
index 937a2b3df..cf8a7782e 100644
--- a/tests/ui/unwind-abis/ffi-unwind-calls-lint.stderr
+++ b/tests/ui/unwind-abis/ffi-unwind-calls-lint.stderr
@@ -1,17 +1,17 @@
warning: call to foreign function with FFI-unwind ABI
- --> $DIR/ffi-unwind-calls-lint.rs:20:14
+ --> $DIR/ffi-unwind-calls-lint.rs:19: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
+ --> $DIR/ffi-unwind-calls-lint.rs:4:9
|
LL | #![warn(ffi_unwind_calls)]
| ^^^^^^^^^^^^^^^^
warning: call to function pointer with FFI-unwind ABI
- --> $DIR/ffi-unwind-calls-lint.rs:24:5
+ --> $DIR/ffi-unwind-calls-lint.rs:23:5
|
LL | ptr();
| ^^^^^ call to function pointer with FFI-unwind ABI