document that panic_impl never passes the FFI boundary

This commit is contained in:
Jorge Aparicio 2018-05-01 03:04:42 +02:00
parent b442348d53
commit eb19361416

View File

@ -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) -> !;
}