diff --git a/src/tools/miri/tests/fail-dep/concurrency/unwind_top_of_stack.rs b/src/tools/miri/tests/fail-dep/concurrency/unwind_top_of_stack.rs index 4704cfed03938..9a5234717d1ff 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/unwind_top_of_stack.rs +++ b/src/tools/miri/tests/fail-dep/concurrency/unwind_top_of_stack.rs @@ -4,8 +4,6 @@ //! Unwinding past the top frame of a stack is Undefined Behavior. -#![feature(c_unwind)] - use std::{mem, ptr}; extern "C-unwind" fn thread_start(_null: *mut libc::c_void) -> *mut libc::c_void { diff --git a/src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind1.rs b/src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind1.rs index 5f4df7c6a1ef3..1ebfecc44e8bc 100644 --- a/src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind1.rs +++ b/src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind1.rs @@ -1,5 +1,4 @@ //@compile-flags: -Zmiri-disable-abi-check -#![feature(c_unwind)] #[no_mangle] extern "C-unwind" fn unwind() { diff --git a/src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind2.rs b/src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind2.rs index e6aff19b02d49..1382e9571f316 100644 --- a/src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind2.rs +++ b/src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind2.rs @@ -4,7 +4,7 @@ //@normalize-stderr-test: "\n +[0-9]+:[^\n]+" -> "" //@normalize-stderr-test: "\n +at [^\n]+" -> "" //@[definition,both]error-in-other-file: aborted execution -#![feature(rustc_attrs, c_unwind)] +#![feature(rustc_attrs)] #[cfg_attr(any(definition, both), rustc_nounwind)] #[no_mangle] diff --git a/src/tools/miri/tests/fail/panic/bad_miri_start_panic.rs b/src/tools/miri/tests/fail/panic/bad_miri_start_panic.rs index 4b0ae60b10101..be2ac7195968e 100644 --- a/src/tools/miri/tests/fail/panic/bad_miri_start_panic.rs +++ b/src/tools/miri/tests/fail/panic/bad_miri_start_panic.rs @@ -1,6 +1,5 @@ //@compile-flags: -Zmiri-disable-abi-check // This feature is required to trigger the error using the "C" ABI. -#![feature(c_unwind)] extern "C" { fn miri_start_panic(payload: *mut u8) -> !; diff --git a/src/tools/miri/tests/fail/panic/bad_unwind.rs b/src/tools/miri/tests/fail/panic/bad_unwind.rs index 370b372a7d373..9c9571a460357 100644 --- a/src/tools/miri/tests/fail/panic/bad_unwind.rs +++ b/src/tools/miri/tests/fail/panic/bad_unwind.rs @@ -1,5 +1,3 @@ -#![feature(c_unwind)] - //! Unwinding when the caller ABI is "C" (without "-unwind") is UB. extern "C-unwind" fn unwind() { diff --git a/src/tools/miri/tests/fail/terminate-terminator.rs b/src/tools/miri/tests/fail/terminate-terminator.rs index 7c6728280305d..465625c757251 100644 --- a/src/tools/miri/tests/fail/terminate-terminator.rs +++ b/src/tools/miri/tests/fail/terminate-terminator.rs @@ -7,8 +7,6 @@ // Enable MIR inlining to ensure that `TerminatorKind::UnwindTerminate` is generated // instead of just `UnwindAction::Terminate`. -#![feature(c_unwind)] - struct Foo; impl Drop for Foo { diff --git a/src/tools/miri/tests/fail/unwind-action-terminate.rs b/src/tools/miri/tests/fail/unwind-action-terminate.rs index 86406872c5991..465e07c8db4b8 100644 --- a/src/tools/miri/tests/fail/unwind-action-terminate.rs +++ b/src/tools/miri/tests/fail/unwind-action-terminate.rs @@ -3,8 +3,6 @@ //@normalize-stderr-test: "\| +\^+" -> "| ^" //@normalize-stderr-test: "\n +[0-9]+:[^\n]+" -> "" //@normalize-stderr-test: "\n +at [^\n]+" -> "" -#![feature(c_unwind)] - extern "C" fn panic_abort() { panic!() } diff --git a/src/tools/miri/tests/panic/function_calls/exported_symbol_good_unwind.rs b/src/tools/miri/tests/panic/function_calls/exported_symbol_good_unwind.rs index 71b799a1f12ba..0e8d45af27fdf 100644 --- a/src/tools/miri/tests/panic/function_calls/exported_symbol_good_unwind.rs +++ b/src/tools/miri/tests/panic/function_calls/exported_symbol_good_unwind.rs @@ -2,7 +2,7 @@ // found in this form" errors works without `-C prefer-dynamic` (`panic!` calls foreign function // `__rust_start_panic`). // no-prefer-dynamic -#![feature(c_unwind, unboxed_closures)] +#![feature(unboxed_closures)] use std::panic; diff --git a/tests/codegen/catch-unwind.rs b/tests/codegen/catch-unwind.rs index 6b63b83ef4594..22620226508e6 100644 --- a/tests/codegen/catch-unwind.rs +++ b/tests/codegen/catch-unwind.rs @@ -14,7 +14,6 @@ // ignore-loongarch64 FIXME #![crate_type = "lib"] -#![feature(c_unwind)] extern "C" { fn bar(); diff --git a/tests/codegen/cffi/c-variadic.rs b/tests/codegen/cffi/c-variadic.rs index cab32652210d0..fc6440dcd383e 100644 --- a/tests/codegen/cffi/c-variadic.rs +++ b/tests/codegen/cffi/c-variadic.rs @@ -4,7 +4,6 @@ #![crate_type = "lib"] #![feature(c_variadic)] -#![feature(c_unwind)] #![no_std] use core::ffi::VaList; diff --git a/tests/codegen/unwind-abis/aapcs-unwind-abi.rs b/tests/codegen/unwind-abis/aapcs-unwind-abi.rs index c092e28a05ac8..d5b1a00a4f116 100644 --- a/tests/codegen/unwind-abis/aapcs-unwind-abi.rs +++ b/tests/codegen/unwind-abis/aapcs-unwind-abi.rs @@ -1,7 +1,7 @@ // needs-llvm-components: arm // compile-flags: --target=armv7-unknown-linux-gnueabihf --crate-type=rlib -Cno-prepopulate-passes #![no_core] -#![feature(no_core, lang_items, c_unwind)] +#![feature(no_core, lang_items)] #[lang="sized"] trait Sized { } diff --git a/tests/codegen/unwind-abis/c-unwind-abi-panic-abort.rs b/tests/codegen/unwind-abis/c-unwind-abi-panic-abort.rs index ea5bae18e2337..50cc3e4b45b20 100644 --- a/tests/codegen/unwind-abis/c-unwind-abi-panic-abort.rs +++ b/tests/codegen/unwind-abis/c-unwind-abi-panic-abort.rs @@ -4,7 +4,6 @@ // when the code is compiled with `panic=abort`. #![crate_type = "lib"] -#![feature(c_unwind)] // CHECK: @rust_item_that_can_unwind() unnamed_addr [[ATTR0:#[0-9]+]] #[no_mangle] diff --git a/tests/codegen/unwind-abis/c-unwind-abi.rs b/tests/codegen/unwind-abis/c-unwind-abi.rs index fa5b6bad75cb3..4001d5a6ca373 100644 --- a/tests/codegen/unwind-abis/c-unwind-abi.rs +++ b/tests/codegen/unwind-abis/c-unwind-abi.rs @@ -6,7 +6,6 @@ // to prevent LLVM from inferring the attribute. #![crate_type = "lib"] -#![feature(c_unwind)] // CHECK: @rust_item_that_cannot_unwind() unnamed_addr #0 { #[no_mangle] diff --git a/tests/codegen/unwind-abis/cdecl-unwind-abi.rs b/tests/codegen/unwind-abis/cdecl-unwind-abi.rs index 64746d32175be..f4906adf50e2e 100644 --- a/tests/codegen/unwind-abis/cdecl-unwind-abi.rs +++ b/tests/codegen/unwind-abis/cdecl-unwind-abi.rs @@ -6,7 +6,6 @@ // disable optimizations above to prevent LLVM from inferring the attribute. #![crate_type = "lib"] -#![feature(c_unwind)] // CHECK: @rust_item_that_cannot_unwind() unnamed_addr #0 { #[no_mangle] diff --git a/tests/codegen/unwind-abis/fastcall-unwind-abi.rs b/tests/codegen/unwind-abis/fastcall-unwind-abi.rs index b74099a5d965b..68df2a903e2d0 100644 --- a/tests/codegen/unwind-abis/fastcall-unwind-abi.rs +++ b/tests/codegen/unwind-abis/fastcall-unwind-abi.rs @@ -1,7 +1,7 @@ // needs-llvm-components: x86 // compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib -Cno-prepopulate-passes #![no_core] -#![feature(no_core, lang_items, c_unwind)] +#![feature(no_core, lang_items)] #[lang="sized"] trait Sized { } diff --git a/tests/codegen/unwind-abis/nounwind.rs b/tests/codegen/unwind-abis/nounwind.rs index c46d717331b46..106d593b21de2 100644 --- a/tests/codegen/unwind-abis/nounwind.rs +++ b/tests/codegen/unwind-abis/nounwind.rs @@ -2,7 +2,6 @@ // ignore-wasm32-bare compiled with panic=abort by default #![crate_type = "lib"] -#![feature(c_unwind)] // We disable optimizations to prevent LLVM from inferring the attribute. diff --git a/tests/codegen/unwind-abis/stdcall-unwind-abi.rs b/tests/codegen/unwind-abis/stdcall-unwind-abi.rs index 8eff0719f8fa7..4f2edb5a9b511 100644 --- a/tests/codegen/unwind-abis/stdcall-unwind-abi.rs +++ b/tests/codegen/unwind-abis/stdcall-unwind-abi.rs @@ -1,7 +1,7 @@ // needs-llvm-components: x86 // compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib -Cno-prepopulate-passes #![no_core] -#![feature(no_core, lang_items, c_unwind)] +#![feature(no_core, lang_items)] #[lang="sized"] trait Sized { } diff --git a/tests/codegen/unwind-abis/system-unwind-abi.rs b/tests/codegen/unwind-abis/system-unwind-abi.rs index f274a33b09948..6336f91c3388a 100644 --- a/tests/codegen/unwind-abis/system-unwind-abi.rs +++ b/tests/codegen/unwind-abis/system-unwind-abi.rs @@ -6,7 +6,6 @@ // optimizations above to prevent LLVM from inferring the attribute. #![crate_type = "lib"] -#![feature(c_unwind)] // CHECK: @rust_item_that_cannot_unwind() unnamed_addr #0 { #[no_mangle] diff --git a/tests/codegen/unwind-abis/sysv64-unwind-abi.rs b/tests/codegen/unwind-abis/sysv64-unwind-abi.rs index 694fde17c3cbe..3bdd6b5161002 100644 --- a/tests/codegen/unwind-abis/sysv64-unwind-abi.rs +++ b/tests/codegen/unwind-abis/sysv64-unwind-abi.rs @@ -1,7 +1,7 @@ // needs-llvm-components: x86 // compile-flags: --target=x86_64-unknown-linux-gnu --crate-type=rlib -Cno-prepopulate-passes #![no_core] -#![feature(no_core, lang_items, c_unwind)] +#![feature(no_core, lang_items)] #[lang="sized"] trait Sized { } diff --git a/tests/codegen/unwind-abis/thiscall-unwind-abi.rs b/tests/codegen/unwind-abis/thiscall-unwind-abi.rs index 0a02755a2cd85..05e8034c894ae 100644 --- a/tests/codegen/unwind-abis/thiscall-unwind-abi.rs +++ b/tests/codegen/unwind-abis/thiscall-unwind-abi.rs @@ -1,7 +1,7 @@ // needs-llvm-components: x86 // compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib -Cno-prepopulate-passes #![no_core] -#![feature(no_core, lang_items, c_unwind)] +#![feature(no_core, lang_items)] #[lang="sized"] trait Sized { } diff --git a/tests/codegen/unwind-abis/vectorcall-unwind-abi.rs b/tests/codegen/unwind-abis/vectorcall-unwind-abi.rs index d7eca2a970002..cb59977ae56f4 100644 --- a/tests/codegen/unwind-abis/vectorcall-unwind-abi.rs +++ b/tests/codegen/unwind-abis/vectorcall-unwind-abi.rs @@ -1,7 +1,7 @@ // needs-llvm-components: x86 // compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib -Cno-prepopulate-passes #![no_core] -#![feature(no_core, lang_items, c_unwind, abi_vectorcall)] +#![feature(no_core, lang_items, abi_vectorcall)] #[lang="sized"] trait Sized { } diff --git a/tests/codegen/unwind-abis/win64-unwind-abi.rs b/tests/codegen/unwind-abis/win64-unwind-abi.rs index 6591348c35d3d..e32946cddede0 100644 --- a/tests/codegen/unwind-abis/win64-unwind-abi.rs +++ b/tests/codegen/unwind-abis/win64-unwind-abi.rs @@ -1,7 +1,7 @@ // needs-llvm-components: x86 // compile-flags: --target=x86_64-unknown-linux-gnu --crate-type=rlib -Cno-prepopulate-passes #![no_core] -#![feature(no_core, lang_items, c_unwind)] +#![feature(no_core, lang_items)] #[lang="sized"] trait Sized { } diff --git a/tests/codegen/unwind-and-panic-abort.rs b/tests/codegen/unwind-and-panic-abort.rs index e43e73b96b996..f319fb422d66b 100644 --- a/tests/codegen/unwind-and-panic-abort.rs +++ b/tests/codegen/unwind-and-panic-abort.rs @@ -1,7 +1,6 @@ // compile-flags: -C panic=abort #![crate_type = "lib"] -#![feature(c_unwind)] extern "C-unwind" { fn bar(); diff --git a/tests/codegen/unwind-extern-exports.rs b/tests/codegen/unwind-extern-exports.rs index 4e1e719d5cd18..a20b4926f52c0 100644 --- a/tests/codegen/unwind-extern-exports.rs +++ b/tests/codegen/unwind-extern-exports.rs @@ -3,7 +3,6 @@ // needs-unwind #![crate_type = "lib"] -#![feature(c_unwind)] // Make sure these all do *not* get the attribute. // We disable optimizations to prevent LLVM from inferring the attribute. diff --git a/tests/codegen/unwind-extern-imports.rs b/tests/codegen/unwind-extern-imports.rs index 260dcc628cc0e..386d2e65f08b5 100644 --- a/tests/codegen/unwind-extern-imports.rs +++ b/tests/codegen/unwind-extern-imports.rs @@ -3,7 +3,6 @@ // needs-unwind #![crate_type = "lib"] -#![feature(c_unwind)] extern "C" { // CHECK: Function Attrs:{{.*}}nounwind diff --git a/tests/coverage/abort.rs b/tests/coverage/abort.rs index 98264bdc1afe5..11ad4286f5865 100644 --- a/tests/coverage/abort.rs +++ b/tests/coverage/abort.rs @@ -1,4 +1,3 @@ -#![feature(c_unwind)] #![allow(unused_assignments)] extern "C" fn might_abort(should_abort: bool) { diff --git a/tests/run-make/forced-unwind-terminate-pof/foo.rs b/tests/run-make/forced-unwind-terminate-pof/foo.rs index 0a51287313f6e..3a84784621708 100644 --- a/tests/run-make/forced-unwind-terminate-pof/foo.rs +++ b/tests/run-make/forced-unwind-terminate-pof/foo.rs @@ -1,6 +1,5 @@ // Tests that forced unwind through POF Rust frames wouldn't trigger our terminating guards. -#![feature(c_unwind)] #![no_main] extern "C-unwind" { diff --git a/tests/ui/asm/x86_64/may_unwind.rs b/tests/ui/asm/x86_64/may_unwind.rs index c11f0938d0b6c..171cae8c514f4 100644 --- a/tests/ui/asm/x86_64/may_unwind.rs +++ b/tests/ui/asm/x86_64/may_unwind.rs @@ -16,7 +16,7 @@ impl Drop for Foo<'_> { } } -extern "C" fn panicky() { +extern "C-unwind" fn panicky() { resume_unwind(Box::new(())); } diff --git a/tests/ui/consts/const-eval/unwind-abort.rs b/tests/ui/consts/const-eval/unwind-abort.rs index 57959e7db6ad9..26113e238883d 100644 --- a/tests/ui/consts/const-eval/unwind-abort.rs +++ b/tests/ui/consts/const-eval/unwind-abort.rs @@ -1,4 +1,4 @@ -#![feature(c_unwind, const_extern_fn)] +#![feature(const_extern_fn)] const extern "C" fn foo() { panic!() //~ ERROR evaluation of constant value failed diff --git a/tests/ui/consts/unwind-abort.rs b/tests/ui/consts/unwind-abort.rs index 6c94fc7b98b75..7b38d6653d1af 100644 --- a/tests/ui/consts/unwind-abort.rs +++ b/tests/ui/consts/unwind-abort.rs @@ -1,6 +1,6 @@ // check-pass -#![feature(c_unwind, const_extern_fn)] +#![feature(const_extern_fn)] // We don't unwind in const-eval anyways. const extern "C" fn foo() { diff --git a/tests/ui/panics/abort-on-panic.rs b/tests/ui/panics/abort-on-panic.rs index 7fbee85ffd14f..1f94fa1a51846 100644 --- a/tests/ui/panics/abort-on-panic.rs +++ b/tests/ui/panics/abort-on-panic.rs @@ -3,7 +3,6 @@ //[next] compile-flags: -Ztrait-solver=next #![allow(unused_must_use)] -#![feature(c_unwind)] #![feature(panic_always_abort)] // Since we mark some ABIs as "nounwind" to LLVM, we must make sure that // we never unwind through them. diff --git a/tests/ui/panics/panic-in-ffi.rs b/tests/ui/panics/panic-in-ffi.rs index d9f1fcee85546..ea067eb3a8b8f 100644 --- a/tests/ui/panics/panic-in-ffi.rs +++ b/tests/ui/panics/panic-in-ffi.rs @@ -7,7 +7,6 @@ // normalize-stderr-test: "(core/src/panicking\.rs):[0-9]+:[0-9]+" -> "$1:$$LINE:$$COL" // needs-unwind // ignore-emscripten "RuntimeError" junk in output -#![feature(c_unwind)] extern "C" fn panic_in_ffi() { panic!("Test"); diff --git a/tests/ui/panics/panic-in-ffi.run.stderr b/tests/ui/panics/panic-in-ffi.run.stderr index a92a66c57fd7d..596355399c801 100644 --- a/tests/ui/panics/panic-in-ffi.run.stderr +++ b/tests/ui/panics/panic-in-ffi.run.stderr @@ -1,4 +1,4 @@ -thread 'main' panicked at $DIR/panic-in-ffi.rs:13:5: +thread 'main' panicked at $DIR/panic-in-ffi.rs:12:5: Test note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace thread 'main' panicked at library/core/src/panicking.rs:$LINE:$COL: 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 d73fe3e0bdada..0000000000000 --- a/tests/ui/unwind-abis/feature-gate-c_unwind.rs +++ /dev/null @@ -1,4 +0,0 @@ -// ignore-test - -// After partial stabilisation, `c_unwind` only contains codegen behaviour changes -// and are tested in `src/test/codegen/unwind-abis`