Unable to use nested withUnsafePointer(to:_:) with parameters marked `borrowing`

I don’t think borrowing would have the effect you think it would, because I don’t think VkAllocationCallbacks is going to be imported as ~Copyable. So per Joe’s explanation, the borrowing keyword won’t have any effect on the calling convention since borrowing is already the default for function arguments.

Can you share these errors, please?

I did find a related thread from this summer where someone encountered the same issue with SDL, but there was no satisfying result.

Unfortunately, I don’t think you can use borrowing to force your desired calling convention without making the type non-copyable, which can only be done by creating your own ~Copyable wrapper type.