Skip to content

Commit

Permalink
Remove c_unwind from tests and fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nbdd0121 committed Jun 19, 2024
1 parent be080ca commit d388c30
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 10 deletions.
2 changes: 0 additions & 2 deletions tests/fail/function_calls/exported_symbol_bad_unwind1.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![feature(c_unwind)]

#[no_mangle]
extern "C-unwind" fn unwind() {
panic!();
Expand Down
2 changes: 1 addition & 1 deletion tests/fail/function_calls/exported_symbol_bad_unwind2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 0 additions & 2 deletions tests/fail/panic/bad_unwind.rs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 0 additions & 2 deletions tests/fail/terminate-terminator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 0 additions & 2 deletions tests/fail/unwind-action-terminate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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!()
}
Expand Down
2 changes: 1 addition & 1 deletion tests/panic/function_calls/exported_symbol_good_unwind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit d388c30

Please sign in to comment.