From de492a3894819e13b0afcb330658ede2d3061ec5 Mon Sep 17 00:00:00 2001 From: Gary Guo Date: Fri, 23 Dec 2022 07:50:05 +0000 Subject: [PATCH] Update tests --- .../c-unwind-abi-catch-lib-panic/main.rs | 1 - .../c-unwind-abi-catch-lib-panic/panic.rs | 1 - .../run-make/c-unwind-abi-catch-panic/main.rs | 1 - tests/run-make/foreign-double-unwind/foo.rs | 2 - tests/run-make/foreign-exceptions/foo.rs | 2 - tests/run-make/foreign-rust-exceptions/bar.rs | 1 - tests/run-make/foreign-rust-exceptions/foo.rs | 2 - tests/rustdoc-json/fn_pointer/abi.rs | 1 - tests/rustdoc-json/fns/abi.rs | 1 - tests/rustdoc-json/methods/abi.rs | 1 - .../feature-gate-thiscall.rs} | 5 +- .../feature-gate-thiscall.stderr} | 49 ++++++-------- .../feature-gates/feature-gate-vectorcall.rs | 4 +- .../panic-runtime/auxiliary/needs-unwind.rs | 1 - .../stability-attribute-trait-impl.rs | 6 +- .../stability-attribute-trait-impl.stderr | 2 +- .../feature-gate-c-unwind-enabled.rs | 12 ---- tests/ui/unwind-abis/feature-gate-c-unwind.rs | 13 ---- .../unwind-abis/feature-gate-c-unwind.stderr | 33 ---------- tests/ui/unwind-abis/feature-gate-c_unwind.rs | 4 ++ .../feature-gate-stdcall-unwind.rs | 30 --------- .../feature-gate-stdcall-unwind.stderr | 66 ------------------- .../unwind-abis/feature-gate-system-unwind.rs | 9 --- .../feature-gate-system-unwind.stderr | 12 ---- tests/ui/unwind-abis/ffi-unwind-calls-lint.rs | 1 - .../unwind-abis/ffi-unwind-calls-lint.stderr | 6 +- 26 files changed, 36 insertions(+), 230 deletions(-) rename tests/ui/{unwind-abis/feature-gate-thiscall-unwind.rs => feature-gates/feature-gate-thiscall.rs} (89%) rename tests/ui/{unwind-abis/feature-gate-thiscall-unwind.stderr => feature-gates/feature-gate-thiscall.stderr} (59%) delete mode 100644 tests/ui/unwind-abis/feature-gate-c-unwind-enabled.rs delete mode 100644 tests/ui/unwind-abis/feature-gate-c-unwind.rs delete mode 100644 tests/ui/unwind-abis/feature-gate-c-unwind.stderr create mode 100644 tests/ui/unwind-abis/feature-gate-c_unwind.rs delete mode 100644 tests/ui/unwind-abis/feature-gate-stdcall-unwind.rs delete mode 100644 tests/ui/unwind-abis/feature-gate-stdcall-unwind.stderr delete mode 100644 tests/ui/unwind-abis/feature-gate-system-unwind.rs delete mode 100644 tests/ui/unwind-abis/feature-gate-system-unwind.stderr diff --git a/tests/run-make/c-unwind-abi-catch-lib-panic/main.rs b/tests/run-make/c-unwind-abi-catch-lib-panic/main.rs index 78a71219c78..42d3efa82d6 100644 --- a/tests/run-make/c-unwind-abi-catch-lib-panic/main.rs +++ b/tests/run-make/c-unwind-abi-catch-lib-panic/main.rs @@ -2,7 +2,6 @@ //! //! This test triggers a panic in a Rust library that our foreign function invokes. This shows //! that we can unwind through the C code in that library, and catch the underlying panic. -#![feature(c_unwind)] use std::panic::{catch_unwind, AssertUnwindSafe}; diff --git a/tests/run-make/c-unwind-abi-catch-lib-panic/panic.rs b/tests/run-make/c-unwind-abi-catch-lib-panic/panic.rs index a99a04d5c6f..9e7bc3e53a1 100644 --- a/tests/run-make/c-unwind-abi-catch-lib-panic/panic.rs +++ b/tests/run-make/c-unwind-abi-catch-lib-panic/panic.rs @@ -1,5 +1,4 @@ #![crate_type = "staticlib"] -#![feature(c_unwind)] /// This function will panic if `x` is greater than 10. /// diff --git a/tests/run-make/c-unwind-abi-catch-panic/main.rs b/tests/run-make/c-unwind-abi-catch-panic/main.rs index 15d38d72160..1903be9561c 100644 --- a/tests/run-make/c-unwind-abi-catch-panic/main.rs +++ b/tests/run-make/c-unwind-abi-catch-panic/main.rs @@ -1,7 +1,6 @@ //! A test for calling `C-unwind` functions across foreign function boundaries. //! //! This test triggers a panic when calling a foreign function that calls *back* into Rust. -#![feature(c_unwind)] use std::panic::{catch_unwind, AssertUnwindSafe}; diff --git a/tests/run-make/foreign-double-unwind/foo.rs b/tests/run-make/foreign-double-unwind/foo.rs index cae8aa9402d..c085480b4f8 100644 --- a/tests/run-make/foreign-double-unwind/foo.rs +++ b/tests/run-make/foreign-double-unwind/foo.rs @@ -1,8 +1,6 @@ // Tests that C++ double unwinding through Rust code will be properly guarded // against instead of exhibiting undefined behaviour. -#![feature(c_unwind)] - extern "C-unwind" { fn throw_cxx_exception(); fn cxx_catch_callback(cb: extern "C-unwind" fn()); diff --git a/tests/run-make/foreign-exceptions/foo.rs b/tests/run-make/foreign-exceptions/foo.rs index dd3b7c76f28..ccf858d8587 100644 --- a/tests/run-make/foreign-exceptions/foo.rs +++ b/tests/run-make/foreign-exceptions/foo.rs @@ -2,8 +2,6 @@ // are caught by catch_unwind. Also tests that Rust panics can unwind through // C++ code. -#![feature(c_unwind)] - use std::panic::{catch_unwind, AssertUnwindSafe}; struct DropCheck<'a>(&'a mut bool); diff --git a/tests/run-make/foreign-rust-exceptions/bar.rs b/tests/run-make/foreign-rust-exceptions/bar.rs index 5f9efe32360..1d865b429fa 100644 --- a/tests/run-make/foreign-rust-exceptions/bar.rs +++ b/tests/run-make/foreign-rust-exceptions/bar.rs @@ -1,5 +1,4 @@ #![crate_type = "cdylib"] -#![feature(c_unwind)] #[no_mangle] extern "C-unwind" fn panic() { diff --git a/tests/run-make/foreign-rust-exceptions/foo.rs b/tests/run-make/foreign-rust-exceptions/foo.rs index 266987c5b6d..38942c55b19 100644 --- a/tests/run-make/foreign-rust-exceptions/foo.rs +++ b/tests/run-make/foreign-rust-exceptions/foo.rs @@ -1,5 +1,3 @@ -#![feature(c_unwind)] - #[cfg_attr(not(windows), link(name = "bar"))] #[cfg_attr(windows, link(name = "bar.dll"))] extern "C-unwind" { diff --git a/tests/rustdoc-json/fn_pointer/abi.rs b/tests/rustdoc-json/fn_pointer/abi.rs index 3c1a453d12d..6a30acc2cc3 100644 --- a/tests/rustdoc-json/fn_pointer/abi.rs +++ b/tests/rustdoc-json/fn_pointer/abi.rs @@ -1,7 +1,6 @@ // ignore-tidy-linelength #![feature(abi_vectorcall)] -#![feature(c_unwind)] // @is "$.index[*][?(@.name=='AbiRust')].inner.type.inner.header.abi" \"Rust\" pub type AbiRust = fn(); diff --git a/tests/rustdoc-json/fns/abi.rs b/tests/rustdoc-json/fns/abi.rs index 0e8b78bc0e6..7a5dbee730c 100644 --- a/tests/rustdoc-json/fns/abi.rs +++ b/tests/rustdoc-json/fns/abi.rs @@ -1,7 +1,6 @@ // ignore-tidy-linelength #![feature(abi_vectorcall)] -#![feature(c_unwind)] // @is "$.index[*][?(@.name=='abi_rust')].inner.header.abi" \"Rust\" pub fn abi_rust() {} diff --git a/tests/rustdoc-json/methods/abi.rs b/tests/rustdoc-json/methods/abi.rs index 4c97d97ceba..fd03d92d65b 100644 --- a/tests/rustdoc-json/methods/abi.rs +++ b/tests/rustdoc-json/methods/abi.rs @@ -1,7 +1,6 @@ // ignore-tidy-linelength #![feature(abi_vectorcall)] -#![feature(c_unwind)] #![feature(no_core)] #![no_core] diff --git a/tests/ui/unwind-abis/feature-gate-thiscall-unwind.rs b/tests/ui/feature-gates/feature-gate-thiscall.rs similarity index 89% rename from tests/ui/unwind-abis/feature-gate-thiscall-unwind.rs rename to tests/ui/feature-gates/feature-gate-thiscall.rs index 0a323e50fcf..97a732bcff7 100644 --- a/tests/ui/unwind-abis/feature-gate-thiscall-unwind.rs +++ b/tests/ui/feature-gates/feature-gate-thiscall.rs @@ -1,5 +1,4 @@ // gate-test-abi_thiscall -// gate-test-c_unwind // needs-llvm-components: x86 // compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib #![no_core] @@ -7,8 +6,8 @@ #[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. +// Test that the "thiscall" ABI is feature-gated, and cannot be used when +// the `abi_thiscall` feature gate is not used. extern "thiscall-unwind" fn fu() {} //~ ERROR thiscall-unwind ABI is experimental extern "thiscall" fn f() {} //~ ERROR thiscall is experimental diff --git a/tests/ui/unwind-abis/feature-gate-thiscall-unwind.stderr b/tests/ui/feature-gates/feature-gate-thiscall.stderr similarity index 59% rename from tests/ui/unwind-abis/feature-gate-thiscall-unwind.stderr rename to tests/ui/feature-gates/feature-gate-thiscall.stderr index 9ca00a55cd8..346e45952cd 100644 --- a/tests/ui/unwind-abis/feature-gate-thiscall-unwind.stderr +++ b/tests/ui/feature-gates/feature-gate-thiscall.stderr @@ -1,14 +1,13 @@ error[E0658]: thiscall-unwind ABI is experimental and subject to change - --> $DIR/feature-gate-thiscall-unwind.rs:13:8 + --> $DIR/feature-gate-thiscall.rs:12:8 | LL | extern "thiscall-unwind" fn fu() {} | ^^^^^^^^^^^^^^^^^ | - = note: see issue #74990 for more information - = help: add `#![feature(c_unwind)]` to the crate attributes to enable + = 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:14:8 + --> $DIR/feature-gate-thiscall.rs:13:8 | LL | extern "thiscall" fn f() {} | ^^^^^^^^^^ @@ -16,7 +15,7 @@ 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 + --> $DIR/feature-gate-thiscall.rs:16:12 | LL | extern "thiscall" fn m(); | ^^^^^^^^^^ @@ -24,16 +23,15 @@ 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 + --> $DIR/feature-gate-thiscall.rs:17:12 | LL | extern "thiscall-unwind" fn mu(); | ^^^^^^^^^^^^^^^^^ | - = note: see issue #74990 for more information - = help: add `#![feature(c_unwind)]` to the crate attributes to enable + = 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:20:12 + --> $DIR/feature-gate-thiscall.rs:19:12 | LL | extern "thiscall" fn dm() {} | ^^^^^^^^^^ @@ -41,16 +39,15 @@ 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 + --> $DIR/feature-gate-thiscall.rs:20:12 | LL | extern "thiscall-unwind" fn dmu() {} | ^^^^^^^^^^^^^^^^^ | - = note: see issue #74990 for more information - = help: add `#![feature(c_unwind)]` to the crate attributes to enable + = 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:26:12 + --> $DIR/feature-gate-thiscall.rs:25:12 | LL | extern "thiscall" fn m() {} | ^^^^^^^^^^ @@ -58,16 +55,15 @@ 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 + --> $DIR/feature-gate-thiscall.rs:26:12 | LL | extern "thiscall-unwind" fn mu() {} | ^^^^^^^^^^^^^^^^^ | - = note: see issue #74990 for more information - = help: add `#![feature(c_unwind)]` to the crate attributes to enable + = 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:31:12 + --> $DIR/feature-gate-thiscall.rs:30:12 | LL | extern "thiscall" fn im() {} | ^^^^^^^^^^ @@ -75,16 +71,15 @@ 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 + --> $DIR/feature-gate-thiscall.rs:31:12 | LL | extern "thiscall-unwind" fn imu() {} | ^^^^^^^^^^^^^^^^^ | - = note: see issue #74990 for more information - = help: add `#![feature(c_unwind)]` to the crate attributes to enable + = 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:35:18 + --> $DIR/feature-gate-thiscall.rs:34:18 | LL | type TA = extern "thiscall" fn(); | ^^^^^^^^^^ @@ -92,16 +87,15 @@ 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 + --> $DIR/feature-gate-thiscall.rs:35:19 | LL | type TAU = extern "thiscall-unwind" fn(); | ^^^^^^^^^^^^^^^^^ | - = note: see issue #74990 for more information - = help: add `#![feature(c_unwind)]` to the crate attributes to enable + = 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:38:8 + --> $DIR/feature-gate-thiscall.rs:37:8 | LL | extern "thiscall" {} | ^^^^^^^^^^ @@ -109,13 +103,12 @@ 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 + --> $DIR/feature-gate-thiscall.rs:38:8 | LL | extern "thiscall-unwind" {} | ^^^^^^^^^^^^^^^^^ | - = note: see issue #74990 for more information - = help: add `#![feature(c_unwind)]` to the crate attributes to enable + = help: add `#![feature(abi_thiscall)]` to the crate attributes to enable error: aborting due to 14 previous errors diff --git a/tests/ui/feature-gates/feature-gate-vectorcall.rs b/tests/ui/feature-gates/feature-gate-vectorcall.rs index 5a6c6d28804..706780dfd6c 100644 --- a/tests/ui/feature-gates/feature-gate-vectorcall.rs +++ b/tests/ui/feature-gates/feature-gate-vectorcall.rs @@ -6,8 +6,8 @@ #[lang="sized"] trait Sized { } -// Test that the "vectorcall-unwind" ABI is feature-gated, and cannot be used when -// the `c_unwind` feature gate is not used. +// Test that the "vectorcall" ABI is feature-gated, and cannot be used when +// the `vectorcall` feature gate is not used. extern "vectorcall" fn f() {} //~ ERROR vectorcall is experimental diff --git a/tests/ui/panic-runtime/auxiliary/needs-unwind.rs b/tests/ui/panic-runtime/auxiliary/needs-unwind.rs index d555b531986..ba917b52d9a 100644 --- a/tests/ui/panic-runtime/auxiliary/needs-unwind.rs +++ b/tests/ui/panic-runtime/auxiliary/needs-unwind.rs @@ -3,7 +3,6 @@ #![crate_type = "rlib"] #![no_std] -#![feature(c_unwind)] extern "C-unwind" fn foo() {} diff --git a/tests/ui/stability-attribute/stability-attribute-trait-impl.rs b/tests/ui/stability-attribute/stability-attribute-trait-impl.rs index 0c771ae8795..1d138e26408 100644 --- a/tests/ui/stability-attribute/stability-attribute-trait-impl.rs +++ b/tests/ui/stability-attribute/stability-attribute-trait-impl.rs @@ -1,4 +1,4 @@ -#![feature(staged_api, never_type, c_unwind)] +#![feature(staged_api, never_type, rust_cold_cc)] //~^ ERROR module has missing stability attribute #[stable(feature = "a", since = "1")] @@ -25,9 +25,9 @@ impl UnstableTrait for StableType {} #[unstable(feature = "h", issue = "none")] impl StableTrait for ! {} -// Note: If C-unwind is stabilized, switch this to another (unstable) ABI. +// Note: If rust_cold_cc is stabilized, switch this to another (unstable) ABI. #[unstable(feature = "i", issue = "none")] -impl StableTrait for extern "C-unwind" fn() {} +impl StableTrait for extern "rust-cold" fn() {} #[unstable(feature = "j", issue = "none")] //~^ ERROR an `#[unstable]` annotation here has no effect [ineffective_unstable_trait_impl] diff --git a/tests/ui/stability-attribute/stability-attribute-trait-impl.stderr b/tests/ui/stability-attribute/stability-attribute-trait-impl.stderr index b91a1d2e11a..96322c2c945 100644 --- a/tests/ui/stability-attribute/stability-attribute-trait-impl.stderr +++ b/tests/ui/stability-attribute/stability-attribute-trait-impl.stderr @@ -18,7 +18,7 @@ LL | #[unstable(feature = "k", issue = "none")] error: module has missing stability attribute --> $DIR/stability-attribute-trait-impl.rs:1:1 | -LL | / #![feature(staged_api, never_type, c_unwind)] +LL | / #![feature(staged_api, never_type, rust_cold_cc)] LL | | LL | | LL | | #[stable(feature = "a", since = "1")] 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 6ff5dbda2d5..00000000000 --- 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 ba72f74f20c..00000000000 --- 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 214ddc45ce9..00000000000 --- 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 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 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 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 00000000000..d73fe3e0bda --- /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 cfa8eb3cad0..00000000000 --- 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 c2cce0e1193..00000000000 --- 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 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 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 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 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 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 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 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 26c2de4e817..00000000000 --- 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 87877336475..00000000000 --- 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 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/ffi-unwind-calls-lint.rs b/tests/ui/unwind-abis/ffi-unwind-calls-lint.rs index 9a324f00435..8f000737656 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 937a2b3dff8..cf8a7782e35 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