make_safe

Macro make_safe 

Source
macro_rules! make_safe {
    ( $ty:ty ) => { ... };
}
Expand description

Convert a function-pointer type to the safe variant of the same signature. Arguments, return type, and ABI are preserved.

ยงExample

type U = unsafe extern "C" fn(i32);
type S = make_safe!(U);
// `S` is `extern "C" fn(i32)`