The code mistakenly assumed that c_char was i8 on all Rust platforms, but that is not true on Linux, so this is causing type mismatch errors at build time on Linux.
(This mistake of mine was presumably reinforced by Rust issue #15823, which is an issue with rustdoc rendering some type aliases in function signatures as the pointed-to type and not by the alias name, which--among other effects--causes CStr::from_raw() and CString::into_raw() to show i8 in their type signatures instead of c_char.)
The code mistakenly assumed that c_char was i8 on all Rust platforms, but that is not true on Linux, so this is causing type mismatch errors at build time on Linux.
(This mistake of mine was presumably reinforced by Rust issue #15823, which is an issue with rustdoc rendering some type aliases in function signatures as the pointed-to type and not by the alias name, which--among other effects--causes CStr::from_raw() and CString::into_raw() to show
i8
in their type signatures instead ofc_char
.)See also: https://github.com/rust-lang/rust/issues/15823