File tree 2 files changed +4
-6
lines changed
2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ fn main() {
11
11
12
12
#[ cfg( fn_ptr) ]
13
13
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
15
15
16
16
// `Instance` caching should not suppress ABI check.
17
17
#[ cfg( cache) ]
@@ -23,7 +23,7 @@ fn main() {
23
23
fn foo ( ) ;
24
24
}
25
25
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
28
28
}
29
29
}
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
2
2
#![ feature( c_unwind) ]
3
3
4
4
//! 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.
7
5
8
6
extern "C-unwind" fn unwind ( ) {
9
7
panic ! ( ) ;
You can’t perform that action at this time.
0 commit comments