Skip to content

Commit 5ab0ea6

Browse files
committed
adjust output for calling convention check
1 parent a312297 commit 5ab0ea6

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

tests/compile-fail/function_calls/exported_symbol_abi_mismatch.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ fn main() {
1111

1212
#[cfg(fn_ptr)]
1313
unsafe { std::mem::transmute::<unsafe fn(), unsafe extern "C" fn()>(foo)() }
14-
//[fn_ptr]~^ ERROR calling a function with ABI Rust using caller ABI C
14+
//[fn_ptr]~^ ERROR calling a function with calling convention Rust using calling convention C
1515

1616
// `Instance` caching should not suppress ABI check.
1717
#[cfg(cache)]
@@ -23,7 +23,7 @@ fn main() {
2323
fn foo();
2424
}
2525
unsafe { foo() }
26-
//[no_cache]~^ ERROR calling a function with ABI Rust using caller ABI C
27-
//[cache]~^^ ERROR calling a function with ABI Rust using caller ABI C
26+
//[no_cache]~^ ERROR calling a function with calling convention Rust using calling convention C
27+
//[cache]~^^ ERROR calling a function with calling convention Rust using calling convention C
2828
}
2929
}

tests/compile-fail/panic/bad_unwind.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
// error-pattern: calling a function with ABI C-unwind using caller ABI C
1+
// error-pattern: unwinding past a stack frame that does not allow unwinding
22
#![feature(c_unwind)]
33

44
//! Unwinding when the caller ABI is "C" (without "-unwind") is UB.
5-
//! Currently we detect the ABI mismatch; we could probably allow such calls in principle one day
6-
//! but then we have to detect the unexpected unwinding.
75
86
extern "C-unwind" fn unwind() {
97
panic!();

0 commit comments

Comments
 (0)