From eb1936141611afa8ad9034c4093e1539df36548c Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Tue, 1 May 2018 03:04:42 +0200 Subject: [PATCH] document that `panic_impl` never passes the FFI boundary --- src/libcore/panicking.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libcore/panicking.rs b/src/libcore/panicking.rs index 71a1eb2f7a4..4b4fa73c478 100644 --- a/src/libcore/panicking.rs +++ b/src/libcore/panicking.rs @@ -42,9 +42,10 @@ #[cfg(not(stage0))] use panic::{Location, PanicInfo}; +// NOTE This function never crosses the FFI boundary; it's a Rust-to-Rust call #[cfg(not(stage0))] #[allow(improper_ctypes)] // PanicInfo contains a trait object which is not FFI safe -extern "C" { +extern "Rust" { #[lang = "panic_impl"] fn panic_impl(pi: &PanicInfo) -> !; }