c2rust
c2rust copied to clipboard
analyze: Lifetimes are incorrectly added to public extern C functions
Running the analyzer on amalgamated CFS adds lifetimes to pointer arguments of publicly exported C functions part of the public API (not called from inside CFS), e.g.
#[no_mangle]
pub unsafe extern "C" fn OS_GetLocalTime<'h0>(mut time_struct: &'h0 (OS_time_t)) -> int32 {
// 5927: mut time_struct: typeof(_1) = *mut {g68} DefId(0:6740 ~ cfs_rust_amalgamated[9f4b]::OS_time_t)
// 5927: mut time_struct: g68 = UNIQUE | NON_NULL, (empty)
if time_struct.is_null() {
where the original function signature was pub unsafe extern "C" fn OS_GetLocalTime(mut time_struct: *mut OS_time_t) -> int32
.