Skip to content

Commit 042cbf1

Browse files
committed
Auto merge of #1868 - hyd-dev:rustup, r=RalfJung
Fix tests for `C-unwind` ABI changes cc rust-lang/rust#87778
2 parents d3157de + af7eb36 commit 042cbf1

9 files changed

+10
-53
lines changed

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
71ff9b41e9ebd3e336019513917a7a8868d1cc66
1+
996ff2e0a0f911f52bb1de6bdd0cfd5704de1fc9

tests/compile-fail/abort-terminator.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// error-pattern: the program aborted
2-
#![feature(unwind_attributes)]
2+
#![feature(c_unwind)]
33

4-
#[unwind(aborts)]
5-
fn panic_abort() { panic!() }
4+
extern "C" fn panic_abort() { panic!() }
65

76
fn main() {
87
panic_abort();

tests/compile-fail/function_calls/exported_symbol_bad_unwind2.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
#[cfg_attr(any(definition, both), rustc_allocator_nounwind)]
55
#[no_mangle]
66
extern "C-unwind" fn nounwind() {
7+
//[definition]~^ ERROR abnormal termination: the program aborted execution
8+
//[both]~^^ ERROR abnormal termination: the program aborted execution
79
panic!();
810
}
911

@@ -14,6 +16,4 @@ fn main() {
1416
}
1517
unsafe { nounwind() }
1618
//[extern_block]~^ ERROR unwinding past a stack frame that does not allow unwinding
17-
//[definition]~^^ ERROR unwinding past a stack frame that does not allow unwinding
18-
//[both]~^^^ ERROR unwinding past a stack frame that does not allow unwinding
1919
}

tests/compile-fail/function_calls/exported_symbol_bad_unwind3.rs

Lines changed: 0 additions & 15 deletions
This file was deleted.

tests/compile-fail/panic/bad_miri_start_panic.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
// compile-flags: -Zmiri-disable-abi-check
2+
// This feature is required to trigger the error using the "C" ABI.
3+
#![feature(c_unwind)]
24

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

tests/run-pass/function_calls/exported_symbol_good_unwind.rs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,10 @@
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, unwind_attributes)]
5+
#![feature(c_unwind, unboxed_closures)]
66

77
use std::panic;
88

9-
#[no_mangle]
10-
#[unwind(allowed)]
11-
extern "C" fn good_unwind_allowed() {
12-
panic!();
13-
}
14-
159
#[no_mangle]
1610
extern "C-unwind" fn good_unwind_c() {
1711
panic!();
@@ -29,11 +23,6 @@ extern "rust-call" fn good_unwind_rust_call(_: ()) -> ! {
2923
}
3024

3125
fn main() -> ! {
32-
extern "C" {
33-
#[unwind(allowed)]
34-
fn good_unwind_allowed();
35-
}
36-
panic::catch_unwind(|| unsafe { good_unwind_allowed() }).unwrap_err();
3726
extern "C-unwind" {
3827
fn good_unwind_c();
3928
}
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
thread 'main' panicked at 'explicit panic', $DIR/exported_symbol_good_unwind.rs:12:5
1+
thread 'main' panicked at 'explicit panic', $DIR/exported_symbol_good_unwind.rs:11:5
22
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
3-
thread 'main' panicked at 'explicit panic', $DIR/exported_symbol_good_unwind.rs:17:5
3+
thread 'main' panicked at 'explicit panic', $DIR/exported_symbol_good_unwind.rs:16:5
44
thread 'main' panicked at 'explicit panic', $DIR/exported_symbol_good_unwind.rs:22:5
5-
thread 'main' panicked at 'explicit panic', $DIR/exported_symbol_good_unwind.rs:28:5

tests/run-pass/function_calls/exported_symbol_unwind_allowed.rs

Lines changed: 0 additions & 15 deletions
This file was deleted.

tests/run-pass/function_calls/exported_symbol_unwind_allowed.stderr

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)