Skip to content

Commit eb19361

Browse files
committed
document that panic_impl never passes the FFI boundary
1 parent b442348 commit eb19361

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/libcore/panicking.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,10 @@ use fmt;
4242
#[cfg(not(stage0))]
4343
use panic::{Location, PanicInfo};
4444

45+
// NOTE This function never crosses the FFI boundary; it's a Rust-to-Rust call
4546
#[cfg(not(stage0))]
4647
#[allow(improper_ctypes)] // PanicInfo contains a trait object which is not FFI safe
47-
extern "C" {
48+
extern "Rust" {
4849
#[lang = "panic_impl"]
4950
fn panic_impl(pi: &PanicInfo) -> !;
5051
}

0 commit comments

Comments
 (0)