From 5812b1fd124768991b690621654aea3eea7400f4 Mon Sep 17 00:00:00 2001 From: Gary Guo Date: Fri, 25 Aug 2023 13:52:51 +0100 Subject: [PATCH] Remove c_unwind from tests and fix tests --- .../exported_symbol_bad_unwind1.rs | 2 -- .../exported_symbol_bad_unwind2.rs | 2 +- src/tools/miri/tests/fail/panic/bad_unwind.rs | 2 -- .../miri/tests/fail/terminate-terminator.rs | 2 -- .../miri/tests/fail/unwind-action-terminate.rs | 2 -- .../exported_symbol_good_unwind.rs | 2 +- tests/assembly/asm/aarch64-modifiers.rs | 2 +- tests/assembly/asm/arm-modifiers.rs | 2 +- tests/assembly/asm/x86-modifiers.rs | 2 +- tests/assembly/simd-bitmask.rs | 2 +- tests/assembly/simd-intrinsic-gather.rs | 2 +- tests/assembly/simd-intrinsic-mask-load.rs | 2 +- tests/assembly/simd-intrinsic-mask-reduce.rs | 2 +- tests/assembly/simd-intrinsic-mask-store.rs | 2 +- tests/assembly/simd-intrinsic-scatter.rs | 2 +- tests/assembly/simd-intrinsic-select.rs | 2 +- tests/codegen/align-byval-alignment-mismatch.rs | 4 ++-- tests/codegen/avr/avr-func-addrspace.rs | 2 +- tests/codegen/catch-unwind.rs | 1 - tests/codegen/cffi/c-variadic.rs | 1 - .../debuginfo-inline-callsite-location.rs | 2 +- tests/codegen/unwind-abis/aapcs-unwind-abi.rs | 2 +- .../unwind-abis/c-unwind-abi-panic-abort.rs | 1 - tests/codegen/unwind-abis/c-unwind-abi.rs | 1 - tests/codegen/unwind-abis/cdecl-unwind-abi.rs | 1 - .../codegen/unwind-abis/fastcall-unwind-abi.rs | 2 +- .../nounwind-on-stable-panic-unwind.rs | 17 ----------------- tests/codegen/unwind-abis/nounwind.rs | 1 - tests/codegen/unwind-abis/stdcall-unwind-abi.rs | 2 +- tests/codegen/unwind-abis/system-unwind-abi.rs | 1 - tests/codegen/unwind-abis/sysv64-unwind-abi.rs | 2 +- .../codegen/unwind-abis/thiscall-unwind-abi.rs | 2 +- .../unwind-abis/vectorcall-unwind-abi.rs | 2 +- tests/codegen/unwind-abis/win64-unwind-abi.rs | 2 +- tests/codegen/unwind-and-panic-abort.rs | 1 - tests/codegen/unwind-extern-exports.rs | 1 - tests/codegen/unwind-extern-imports.rs | 1 - tests/coverage/abort.cov-map | 8 ++++---- tests/coverage/abort.coverage | 1 - tests/coverage/abort.rs | 1 - .../run-make/forced-unwind-terminate-pof/foo.rs | 1 - tests/ui/asm/x86_64/may_unwind.rs | 2 +- tests/ui/consts/const-eval/unwind-abort.rs | 2 +- tests/ui/consts/unwind-abort.rs | 2 +- tests/ui/panics/abort-on-panic.rs | 1 - tests/ui/panics/panic-in-ffi.rs | 1 - tests/ui/panics/panic-in-ffi.run.stderr | 2 +- tests/ui/unwind-abis/feature-gate-c_unwind.rs | 4 ---- 48 files changed, 31 insertions(+), 75 deletions(-) delete mode 100644 tests/codegen/unwind-abis/nounwind-on-stable-panic-unwind.rs delete mode 100644 tests/ui/unwind-abis/feature-gate-c_unwind.rs 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 6d68b9a46d9..dc192d03196 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,3 @@ -#![feature(c_unwind)] - #[no_mangle] extern "C-unwind" fn unwind() { panic!(); 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 e6aff19b02d..1382e9571f3 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_unwind.rs b/src/tools/miri/tests/fail/panic/bad_unwind.rs index 8c8a9f18cdc..5370485b2a6 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. // The opposite version (callee does not allow unwinding) is impossible to // even write: MIR validation catches functions that have `UnwindContinue` but diff --git a/src/tools/miri/tests/fail/terminate-terminator.rs b/src/tools/miri/tests/fail/terminate-terminator.rs index 7c672828030..465625c7572 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 86406872c59..465e07c8db4 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 71b799a1f12..0e8d45af27f 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/assembly/asm/aarch64-modifiers.rs b/tests/assembly/asm/aarch64-modifiers.rs index ffba06ae47b..b7ef1d77ea0 100644 --- a/tests/assembly/asm/aarch64-modifiers.rs +++ b/tests/assembly/asm/aarch64-modifiers.rs @@ -1,5 +1,5 @@ //@ assembly-output: emit-asm -//@ compile-flags: -O +//@ compile-flags: -O -C panic=abort //@ compile-flags: --target aarch64-unknown-linux-gnu //@ needs-llvm-components: aarch64 diff --git a/tests/assembly/asm/arm-modifiers.rs b/tests/assembly/asm/arm-modifiers.rs index fa2e75eb35b..0674e169d72 100644 --- a/tests/assembly/asm/arm-modifiers.rs +++ b/tests/assembly/asm/arm-modifiers.rs @@ -1,5 +1,5 @@ //@ assembly-output: emit-asm -//@ compile-flags: -O +//@ compile-flags: -O -C panic=abort //@ compile-flags: --target armv7-unknown-linux-gnueabihf //@ compile-flags: -C target-feature=+neon //@ needs-llvm-components: arm diff --git a/tests/assembly/asm/x86-modifiers.rs b/tests/assembly/asm/x86-modifiers.rs index 1a92585298d..c5e393b1056 100644 --- a/tests/assembly/asm/x86-modifiers.rs +++ b/tests/assembly/asm/x86-modifiers.rs @@ -1,6 +1,6 @@ //@ revisions: x86_64 i686 //@ assembly-output: emit-asm -//@ compile-flags: -O +//@ compile-flags: -O -C panic=abort //@[x86_64] compile-flags: --target x86_64-unknown-linux-gnu //@[x86_64] needs-llvm-components: x86 //@[i686] compile-flags: --target i686-unknown-linux-gnu diff --git a/tests/assembly/simd-bitmask.rs b/tests/assembly/simd-bitmask.rs index 8264a706852..cd22ca06706 100644 --- a/tests/assembly/simd-bitmask.rs +++ b/tests/assembly/simd-bitmask.rs @@ -11,7 +11,7 @@ //@ [aarch64] needs-llvm-components: aarch64 //@ [aarch64] min-llvm-version: 18.0 //@ assembly-output: emit-asm -//@ compile-flags: --crate-type=lib -O +//@ compile-flags: --crate-type=lib -O -C panic=abort #![feature(no_core, lang_items, repr_simd, intrinsics)] #![no_core] diff --git a/tests/assembly/simd-intrinsic-gather.rs b/tests/assembly/simd-intrinsic-gather.rs index ef6b597c25f..83015f05ab3 100644 --- a/tests/assembly/simd-intrinsic-gather.rs +++ b/tests/assembly/simd-intrinsic-gather.rs @@ -4,7 +4,7 @@ //@ [x86-avx512] needs-llvm-components: x86 //@ [x86-avx512] min-llvm-version: 18.0 //@ assembly-output: emit-asm -//@ compile-flags: --crate-type=lib -O +//@ compile-flags: --crate-type=lib -O -C panic=abort #![feature(no_core, lang_items, repr_simd, intrinsics)] #![no_core] diff --git a/tests/assembly/simd-intrinsic-mask-load.rs b/tests/assembly/simd-intrinsic-mask-load.rs index 49d231c45f8..d537c143d36 100644 --- a/tests/assembly/simd-intrinsic-mask-load.rs +++ b/tests/assembly/simd-intrinsic-mask-load.rs @@ -6,7 +6,7 @@ //@ [x86-avx512] compile-flags: -C target-feature=+avx512f,+avx512vl,+avx512bw,+avx512dq //@ [x86-avx512] needs-llvm-components: x86 //@ assembly-output: emit-asm -//@ compile-flags: --crate-type=lib -O +//@ compile-flags: --crate-type=lib -O -C panic=abort #![feature(no_core, lang_items, repr_simd, intrinsics)] #![no_core] diff --git a/tests/assembly/simd-intrinsic-mask-reduce.rs b/tests/assembly/simd-intrinsic-mask-reduce.rs index 72c3f6376e8..dd4dbaeda76 100644 --- a/tests/assembly/simd-intrinsic-mask-reduce.rs +++ b/tests/assembly/simd-intrinsic-mask-reduce.rs @@ -8,7 +8,7 @@ //@ [aarch64] needs-llvm-components: aarch64 //@ [aarch64] min-llvm-version: 18.0 //@ assembly-output: emit-asm -//@ compile-flags: --crate-type=lib -O +//@ compile-flags: --crate-type=lib -O -C panic=abort #![feature(no_core, lang_items, repr_simd, intrinsics)] #![no_core] diff --git a/tests/assembly/simd-intrinsic-mask-store.rs b/tests/assembly/simd-intrinsic-mask-store.rs index a6611e1c23d..5d4c00c3823 100644 --- a/tests/assembly/simd-intrinsic-mask-store.rs +++ b/tests/assembly/simd-intrinsic-mask-store.rs @@ -6,7 +6,7 @@ //@ [x86-avx512] compile-flags: -C target-feature=+avx512f,+avx512vl,+avx512bw,+avx512dq //@ [x86-avx512] needs-llvm-components: x86 //@ assembly-output: emit-asm -//@ compile-flags: --crate-type=lib -O +//@ compile-flags: --crate-type=lib -O -C panic=abort #![feature(no_core, lang_items, repr_simd, intrinsics)] #![no_core] diff --git a/tests/assembly/simd-intrinsic-scatter.rs b/tests/assembly/simd-intrinsic-scatter.rs index 6ffefb0801a..55095e4cb68 100644 --- a/tests/assembly/simd-intrinsic-scatter.rs +++ b/tests/assembly/simd-intrinsic-scatter.rs @@ -4,7 +4,7 @@ //@ [x86-avx512] needs-llvm-components: x86 //@ [x86-avx512] min-llvm-version: 18.0 //@ assembly-output: emit-asm -//@ compile-flags: --crate-type=lib -O +//@ compile-flags: --crate-type=lib -O -C panic=abort #![feature(no_core, lang_items, repr_simd, intrinsics)] #![no_core] diff --git a/tests/assembly/simd-intrinsic-select.rs b/tests/assembly/simd-intrinsic-select.rs index 3f36402e3d0..4dfc2f9ed1f 100644 --- a/tests/assembly/simd-intrinsic-select.rs +++ b/tests/assembly/simd-intrinsic-select.rs @@ -9,7 +9,7 @@ //@ [aarch64] needs-llvm-components: aarch64 //@ [aarch64] min-llvm-version: 18.0 //@ assembly-output: emit-asm -//@ compile-flags: --crate-type=lib -O +//@ compile-flags: --crate-type=lib -O -C panic=abort #![feature(no_core, lang_items, repr_simd, intrinsics)] #![no_core] diff --git a/tests/codegen/align-byval-alignment-mismatch.rs b/tests/codegen/align-byval-alignment-mismatch.rs index 71f2dd42ec2..835cc7393e5 100644 --- a/tests/codegen/align-byval-alignment-mismatch.rs +++ b/tests/codegen/align-byval-alignment-mismatch.rs @@ -1,9 +1,9 @@ // ignore-tidy-linelength //@ revisions:i686-linux x86_64-linux -//@[i686-linux] compile-flags: --target i686-unknown-linux-gnu +//@[i686-linux] compile-flags: --target i686-unknown-linux-gnu -C panic=abort //@[i686-linux] needs-llvm-components: x86 -//@[x86_64-linux] compile-flags: --target x86_64-unknown-linux-gnu +//@[x86_64-linux] compile-flags: --target x86_64-unknown-linux-gnu -C panic=abort //@[x86_64-linux] needs-llvm-components: x86 // Tests that we correctly copy arguments into allocas when the alignment of the byval argument diff --git a/tests/codegen/avr/avr-func-addrspace.rs b/tests/codegen/avr/avr-func-addrspace.rs index 2d9efb52c7c..70834707564 100644 --- a/tests/codegen/avr/avr-func-addrspace.rs +++ b/tests/codegen/avr/avr-func-addrspace.rs @@ -1,4 +1,4 @@ -//@ compile-flags: -O --target=avr-unknown-gnu-atmega328 --crate-type=rlib +//@ compile-flags: -O --target=avr-unknown-gnu-atmega328 --crate-type=rlib -C panic=abort //@ needs-llvm-components: avr // This test validates that function pointers can be stored in global variables diff --git a/tests/codegen/catch-unwind.rs b/tests/codegen/catch-unwind.rs index 4e1f9a88e95..48ad486fa03 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 914d1623ed2..140d2f37f46 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/debuginfo-inline-callsite-location.rs b/tests/codegen/debuginfo-inline-callsite-location.rs index f690c9c0937..aee07b4eb8c 100644 --- a/tests/codegen/debuginfo-inline-callsite-location.rs +++ b/tests/codegen/debuginfo-inline-callsite-location.rs @@ -1,4 +1,4 @@ -//@ compile-flags: -g -O +//@ compile-flags: -g -O -C panic=abort // Check that each inline call site for the same function uses the same "sub-program" so that LLVM // can correctly merge the debug info if it merges the inlined code (e.g., for merging of tail diff --git a/tests/codegen/unwind-abis/aapcs-unwind-abi.rs b/tests/codegen/unwind-abis/aapcs-unwind-abi.rs index 48c7ecf7824..0d9c7757883 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 8bb2122946f..8d2745ba2f7 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 99763943a6a..46c08b5fc4f 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 78dbb55b35a..8e643d6ce49 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 3cbeaf51d96..4c7b2856e2e 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-on-stable-panic-unwind.rs b/tests/codegen/unwind-abis/nounwind-on-stable-panic-unwind.rs deleted file mode 100644 index a7f7f2fb77f..00000000000 --- a/tests/codegen/unwind-abis/nounwind-on-stable-panic-unwind.rs +++ /dev/null @@ -1,17 +0,0 @@ -//@ compile-flags: -C opt-level=0 -//@ needs-unwind - -#![crate_type = "lib"] - -// We disable optimizations to prevent LLVM from inferring the attribute. - -extern "C" { - fn bar(); -} - -// CHECK-NOT: Function Attrs:{{.*}}nounwind -pub unsafe extern "C" fn foo() { - bar(); -} - -// Note that this test will get removed when `C-unwind` is fully stabilized diff --git a/tests/codegen/unwind-abis/nounwind.rs b/tests/codegen/unwind-abis/nounwind.rs index 80bf8d67091..e40ed48ca73 100644 --- a/tests/codegen/unwind-abis/nounwind.rs +++ b/tests/codegen/unwind-abis/nounwind.rs @@ -2,7 +2,6 @@ //@ needs-unwind #![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 ffb235cd116..ffc11d1faef 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 1dd0e9bbbec..5f910248346 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 9824009dc55..c869ca7e2b8 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 a96f4d5a350..19b23ee47ba 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 9929e3e3703..b420f67ca9b 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 a45a94f628d..2697d3cbcd6 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 430502308cf..8efa140058a 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 ea59748b3bc..e692fd1a547 100644 --- a/tests/codegen/unwind-extern-exports.rs +++ b/tests/codegen/unwind-extern-exports.rs @@ -2,7 +2,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 790e4def8b3..dfae8aae64a 100644 --- a/tests/codegen/unwind-extern-imports.rs +++ b/tests/codegen/unwind-extern-imports.rs @@ -2,7 +2,6 @@ //@ needs-unwind #![crate_type = "lib"] -#![feature(c_unwind)] extern "C" { // CHECK: Function Attrs:{{.*}}nounwind diff --git a/tests/coverage/abort.cov-map b/tests/coverage/abort.cov-map index 5673fa98ca6..15156ec9811 100644 --- a/tests/coverage/abort.cov-map +++ b/tests/coverage/abort.cov-map @@ -1,5 +1,5 @@ Function name: abort::main -Raw bytes (89): 0x[01, 01, 0a, 01, 27, 05, 09, 03, 0d, 22, 11, 03, 0d, 03, 0d, 22, 15, 03, 0d, 03, 0d, 05, 09, 0d, 01, 0e, 01, 01, 1b, 03, 02, 0b, 00, 18, 22, 01, 0c, 00, 19, 11, 00, 1a, 02, 0a, 0e, 02, 0a, 00, 0b, 22, 02, 0c, 00, 19, 15, 00, 1a, 00, 31, 1a, 00, 31, 00, 32, 22, 04, 0c, 00, 19, 05, 00, 1a, 00, 31, 09, 00, 31, 00, 32, 27, 01, 09, 00, 17, 0d, 02, 05, 01, 02] +Raw bytes (89): 0x[01, 01, 0a, 01, 27, 05, 09, 03, 0d, 22, 11, 03, 0d, 03, 0d, 22, 15, 03, 0d, 03, 0d, 05, 09, 0d, 01, 0d, 01, 01, 1b, 03, 02, 0b, 00, 18, 22, 01, 0c, 00, 19, 11, 00, 1a, 02, 0a, 0e, 02, 0a, 00, 0b, 22, 02, 0c, 00, 19, 15, 00, 1a, 00, 31, 1a, 00, 31, 00, 32, 22, 04, 0c, 00, 19, 05, 00, 1a, 00, 31, 09, 00, 31, 00, 32, 27, 01, 09, 00, 17, 0d, 02, 05, 01, 02] Number of files: 1 - file 0 => global file 1 Number of expressions: 10 @@ -14,7 +14,7 @@ Number of expressions: 10 - expression 8 operands: lhs = Expression(0, Add), rhs = Counter(3) - expression 9 operands: lhs = Counter(1), rhs = Counter(2) Number of file 0 mappings: 13 -- Code(Counter(0)) at (prev + 14, 1) to (start + 1, 27) +- Code(Counter(0)) at (prev + 13, 1) to (start + 1, 27) - Code(Expression(0, Add)) at (prev + 2, 11) to (start + 0, 24) = (c0 + (c1 + c2)) - Code(Expression(8, Sub)) at (prev + 1, 12) to (start + 0, 25) @@ -36,13 +36,13 @@ Number of file 0 mappings: 13 - Code(Counter(3)) at (prev + 2, 5) to (start + 1, 2) Function name: abort::might_abort -Raw bytes (21): 0x[01, 01, 01, 01, 05, 03, 01, 04, 01, 01, 14, 05, 02, 09, 01, 24, 02, 02, 0c, 03, 02] +Raw bytes (21): 0x[01, 01, 01, 01, 05, 03, 01, 03, 01, 01, 14, 05, 02, 09, 01, 24, 02, 02, 0c, 03, 02] Number of files: 1 - file 0 => global file 1 Number of expressions: 1 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) Number of file 0 mappings: 3 -- Code(Counter(0)) at (prev + 4, 1) to (start + 1, 20) +- Code(Counter(0)) at (prev + 3, 1) to (start + 1, 20) - Code(Counter(1)) at (prev + 2, 9) to (start + 1, 36) - Code(Expression(0, Sub)) at (prev + 2, 12) to (start + 3, 2) = (c0 - c1) diff --git a/tests/coverage/abort.coverage b/tests/coverage/abort.coverage index b658a656259..29e3ad5eda7 100644 --- a/tests/coverage/abort.coverage +++ b/tests/coverage/abort.coverage @@ -1,4 +1,3 @@ - LL| |#![feature(c_unwind)] LL| |#![allow(unused_assignments)] LL| | LL| 12|extern "C" fn might_abort(should_abort: bool) { diff --git a/tests/coverage/abort.rs b/tests/coverage/abort.rs index 649e8e52a49..6c06a3f9d87 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 0a51287313f..3a847846217 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 3b2c1edcd47..d3a2916df9d 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 57959e7db6a..26113e23888 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 35db9152bd5..1dd33f327fb 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 5736ecf8685..feccefb2537 100644 --- a/tests/ui/panics/abort-on-panic.rs +++ b/tests/ui/panics/abort-on-panic.rs @@ -4,7 +4,6 @@ //@[next] compile-flags: -Znext-solver #![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 6f54acb3e04..88f45f9a871 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 a92a66c57fd..596355399c8 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 28ef7d57788..00000000000 --- 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`