Support native ARM64 MSVC toolchain, and fallback to x64 if emulation is available by dpaoliello · Pull Request #957 · rust-lang/cc-rs (original) (raw)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, opened #1010 to update safety comment for the function.

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.