Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit c604de0

Browse files
committedNov 9, 2023
Remove c_unwind from tests
1 parent bde7be8 commit c604de0

34 files changed

+13
-41
lines changed
 

‎src/tools/miri/tests/fail-dep/concurrency/unwind_top_of_stack.rs

-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
//! Unwinding past the top frame of a stack is Undefined Behavior.
66
7-
#![feature(c_unwind)]
8-
97
use std::{mem, ptr};
108

119
extern "C-unwind" fn thread_start(_null: *mut libc::c_void) -> *mut libc::c_void {

‎src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind1.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//@compile-flags: -Zmiri-disable-abi-check
2-
#![feature(c_unwind)]
32

43
#[no_mangle]
54
extern "C-unwind" fn unwind() {

‎src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//@normalize-stderr-test: "\n +[0-9]+:[^\n]+" -> ""
55
//@normalize-stderr-test: "\n +at [^\n]+" -> ""
66
//@[definition,both]error-in-other-file: aborted execution
7-
#![feature(rustc_attrs, c_unwind)]
7+
#![feature(rustc_attrs)]
88

99
#[cfg_attr(any(definition, both), rustc_nounwind)]
1010
#[no_mangle]

‎src/tools/miri/tests/fail/panic/bad_miri_start_panic.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
//@compile-flags: -Zmiri-disable-abi-check
22
// This feature is required to trigger the error using the "C" ABI.
3-
#![feature(c_unwind)]
43

54
extern "C" {
65
fn miri_start_panic(payload: *mut u8) -> !;

‎src/tools/miri/tests/fail/panic/bad_unwind.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![feature(c_unwind)]
2-
31
//! Unwinding when the caller ABI is "C" (without "-unwind") is UB.
42
53
extern "C-unwind" fn unwind() {

‎src/tools/miri/tests/fail/terminate-terminator.rs

-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
// Enable MIR inlining to ensure that `TerminatorKind::UnwindTerminate` is generated
88
// instead of just `UnwindAction::Terminate`.
99

10-
#![feature(c_unwind)]
11-
1210
struct Foo;
1311

1412
impl Drop for Foo {

‎src/tools/miri/tests/fail/unwind-action-terminate.rs

-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
//@normalize-stderr-test: "\| +\^+" -> "| ^"
44
//@normalize-stderr-test: "\n +[0-9]+:[^\n]+" -> ""
55
//@normalize-stderr-test: "\n +at [^\n]+" -> ""
6-
#![feature(c_unwind)]
7-
86
extern "C" fn panic_abort() {
97
panic!()
108
}

‎src/tools/miri/tests/panic/function_calls/exported_symbol_good_unwind.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// found in this form" errors works without `-C prefer-dynamic` (`panic!` calls foreign function
33
// `__rust_start_panic`).
44
// no-prefer-dynamic
5-
#![feature(c_unwind, unboxed_closures)]
5+
#![feature(unboxed_closures)]
66

77
use std::panic;
88

‎tests/codegen/catch-unwind.rs

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
// ignore-loongarch64 FIXME
1515

1616
#![crate_type = "lib"]
17-
#![feature(c_unwind)]
1817

1918
extern "C" {
2019
fn bar();

‎tests/codegen/cffi/c-variadic.rs

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
#![crate_type = "lib"]
66
#![feature(c_variadic)]
7-
#![feature(c_unwind)]
87
#![no_std]
98
use core::ffi::VaList;
109

‎tests/codegen/unwind-abis/aapcs-unwind-abi.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// needs-llvm-components: arm
22
// compile-flags: --target=armv7-unknown-linux-gnueabihf --crate-type=rlib -Cno-prepopulate-passes
33
#![no_core]
4-
#![feature(no_core, lang_items, c_unwind)]
4+
#![feature(no_core, lang_items)]
55
#[lang="sized"]
66
trait Sized { }
77

‎tests/codegen/unwind-abis/c-unwind-abi-panic-abort.rs

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
// when the code is compiled with `panic=abort`.
55

66
#![crate_type = "lib"]
7-
#![feature(c_unwind)]
87

98
// CHECK: @rust_item_that_can_unwind() unnamed_addr [[ATTR0:#[0-9]+]]
109
#[no_mangle]

‎tests/codegen/unwind-abis/c-unwind-abi.rs

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
// to prevent LLVM from inferring the attribute.
77

88
#![crate_type = "lib"]
9-
#![feature(c_unwind)]
109

1110
// CHECK: @rust_item_that_cannot_unwind() unnamed_addr #0 {
1211
#[no_mangle]

‎tests/codegen/unwind-abis/cdecl-unwind-abi.rs

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
// disable optimizations above to prevent LLVM from inferring the attribute.
77

88
#![crate_type = "lib"]
9-
#![feature(c_unwind)]
109

1110
// CHECK: @rust_item_that_cannot_unwind() unnamed_addr #0 {
1211
#[no_mangle]

‎tests/codegen/unwind-abis/fastcall-unwind-abi.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// needs-llvm-components: x86
22
// compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib -Cno-prepopulate-passes
33
#![no_core]
4-
#![feature(no_core, lang_items, c_unwind)]
4+
#![feature(no_core, lang_items)]
55
#[lang="sized"]
66
trait Sized { }
77

‎tests/codegen/unwind-abis/nounwind.rs

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// ignore-wasm32-bare compiled with panic=abort by default
33

44
#![crate_type = "lib"]
5-
#![feature(c_unwind)]
65

76
// We disable optimizations to prevent LLVM from inferring the attribute.
87

‎tests/codegen/unwind-abis/stdcall-unwind-abi.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// needs-llvm-components: x86
22
// compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib -Cno-prepopulate-passes
33
#![no_core]
4-
#![feature(no_core, lang_items, c_unwind)]
4+
#![feature(no_core, lang_items)]
55
#[lang="sized"]
66
trait Sized { }
77

‎tests/codegen/unwind-abis/system-unwind-abi.rs

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
// optimizations above to prevent LLVM from inferring the attribute.
77

88
#![crate_type = "lib"]
9-
#![feature(c_unwind)]
109

1110
// CHECK: @rust_item_that_cannot_unwind() unnamed_addr #0 {
1211
#[no_mangle]

‎tests/codegen/unwind-abis/sysv64-unwind-abi.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// needs-llvm-components: x86
22
// compile-flags: --target=x86_64-unknown-linux-gnu --crate-type=rlib -Cno-prepopulate-passes
33
#![no_core]
4-
#![feature(no_core, lang_items, c_unwind)]
4+
#![feature(no_core, lang_items)]
55
#[lang="sized"]
66
trait Sized { }
77

‎tests/codegen/unwind-abis/thiscall-unwind-abi.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// needs-llvm-components: x86
22
// compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib -Cno-prepopulate-passes
33
#![no_core]
4-
#![feature(no_core, lang_items, c_unwind)]
4+
#![feature(no_core, lang_items)]
55
#[lang="sized"]
66
trait Sized { }
77

‎tests/codegen/unwind-abis/vectorcall-unwind-abi.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// needs-llvm-components: x86
22
// compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib -Cno-prepopulate-passes
33
#![no_core]
4-
#![feature(no_core, lang_items, c_unwind, abi_vectorcall)]
4+
#![feature(no_core, lang_items, abi_vectorcall)]
55
#[lang="sized"]
66
trait Sized { }
77

‎tests/codegen/unwind-abis/win64-unwind-abi.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// needs-llvm-components: x86
22
// compile-flags: --target=x86_64-unknown-linux-gnu --crate-type=rlib -Cno-prepopulate-passes
33
#![no_core]
4-
#![feature(no_core, lang_items, c_unwind)]
4+
#![feature(no_core, lang_items)]
55
#[lang="sized"]
66
trait Sized { }
77

‎tests/codegen/unwind-and-panic-abort.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// compile-flags: -C panic=abort
22

33
#![crate_type = "lib"]
4-
#![feature(c_unwind)]
54

65
extern "C-unwind" {
76
fn bar();

‎tests/codegen/unwind-extern-exports.rs

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// needs-unwind
44

55
#![crate_type = "lib"]
6-
#![feature(c_unwind)]
76

87
// Make sure these all do *not* get the attribute.
98
// We disable optimizations to prevent LLVM from inferring the attribute.

‎tests/codegen/unwind-extern-imports.rs

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// needs-unwind
44

55
#![crate_type = "lib"]
6-
#![feature(c_unwind)]
76

87
extern "C" {
98
// CHECK: Function Attrs:{{.*}}nounwind

‎tests/coverage/abort.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#![feature(c_unwind)]
21
#![allow(unused_assignments)]
32

43
extern "C" fn might_abort(should_abort: bool) {

‎tests/run-make/forced-unwind-terminate-pof/foo.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Tests that forced unwind through POF Rust frames wouldn't trigger our terminating guards.
22

3-
#![feature(c_unwind)]
43
#![no_main]
54

65
extern "C-unwind" {

‎tests/ui/asm/x86_64/may_unwind.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ impl Drop for Foo<'_> {
1616
}
1717
}
1818

19-
extern "C" fn panicky() {
19+
extern "C-unwind" fn panicky() {
2020
resume_unwind(Box::new(()));
2121
}
2222

‎tests/ui/consts/const-eval/unwind-abort.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![feature(c_unwind, const_extern_fn)]
1+
#![feature(const_extern_fn)]
22

33
const extern "C" fn foo() {
44
panic!() //~ ERROR evaluation of constant value failed

‎tests/ui/consts/unwind-abort.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// check-pass
22

3-
#![feature(c_unwind, const_extern_fn)]
3+
#![feature(const_extern_fn)]
44

55
// We don't unwind in const-eval anyways.
66
const extern "C" fn foo() {

‎tests/ui/panics/abort-on-panic.rs

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
//[next] compile-flags: -Ztrait-solver=next
44

55
#![allow(unused_must_use)]
6-
#![feature(c_unwind)]
76
#![feature(panic_always_abort)]
87
// Since we mark some ABIs as "nounwind" to LLVM, we must make sure that
98
// we never unwind through them.

‎tests/ui/panics/panic-in-ffi.rs

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
// normalize-stderr-test: "(core/src/panicking\.rs):[0-9]+:[0-9]+" -> "$1:$$LINE:$$COL"
88
// needs-unwind
99
// ignore-emscripten "RuntimeError" junk in output
10-
#![feature(c_unwind)]
1110

1211
extern "C" fn panic_in_ffi() {
1312
panic!("Test");

‎tests/ui/panics/panic-in-ffi.run.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
thread 'main' panicked at $DIR/panic-in-ffi.rs:13:5:
1+
thread 'main' panicked at $DIR/panic-in-ffi.rs:12:5:
22
Test
33
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
44
thread 'main' panicked at library/core/src/panicking.rs:$LINE:$COL:

‎tests/ui/unwind-abis/feature-gate-c_unwind.rs

-4
This file was deleted.

0 commit comments

Comments
 (0)
Failed to load comments.