Open
Description
Take for example https://doc.rust-lang.org/std/ffi/struct.CStr.html#method.from_ptr, which says the signature for CStr::from_ptr
is:
pub unsafe fn from_ptr<'a>(ptr: *const i8) -> &'a CStr
The real signature uses c_char
instead of i8
, which is notably different because c_char
can be either i8
or u8
depending on the platform. I had to follow the link to the source to make sure it was taking *const c_char
and not an actual *const i8
, which would have required a conversion.