File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff line change 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
86extern "C-unwind" fn unwind ( ) {
97 panic ! ( ) ;
You can’t perform that action at this time.
0 commit comments