Description
When wrapping a C library that follows the typical approach of a Create/Destroy combination and also cannot be cloned or copied, there is no way to specify in any capacity that the C struct cannot be copied, there is a SwiftDestroyOp, and the result of the function cannot be inferred to be marked as owned.
Reproduction
Specify this information in a .apinote, any C API will do.
Expected behavior
The swift compiler skips the entire operation, ignoring the definition/information entirely.
Environment
Swift version 6.3.2 (swift-6.3.2-RELEASE)
Target: x86_64-unknown-windows-msvc
Build config: +assertions
Additional information
No response
Description
When wrapping a C library that follows the typical approach of a Create/Destroy combination and also cannot be cloned or copied, there is no way to specify in any capacity that the C struct cannot be copied, there is a
SwiftDestroyOp, and the result of the function cannot be inferred to be marked asowned.Reproduction
Specify this information in a
.apinote, any C API will do.Expected behavior
The swift compiler skips the entire operation, ignoring the definition/information entirely.
Environment
Swift version 6.3.2 (swift-6.3.2-RELEASE)
Target: x86_64-unknown-windows-msvc
Build config: +assertions
Additional information
No response