I can't add lifetime to the return type directly, I can only add bound to the generic F.
However, I don't think we can add lifetime to function pointer, a newtype that dereferences to F would have the same problem since function pointer is copyable, so the only option is to add a safety comment for this unsafe function.
Fix https://github.com/rust-lang/cc-rs/pull/957#discussion_r1525614843
I can't add lifetime to the return type directly, I can only add bound to the generic F.
However, I don't think we can add lifetime to function pointer, a newtype that dereferences to F would have the same problem since function pointer is copyable, so the only option is to add a safety comment for this unsafe function.