Skip to content

[BitwiseCopyable] Imported type improvements. #72108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

nate-chandler
Copy link
Contributor

Tested inference for imported types. Don't infer when an imported type has storage that isn't imported into Swift. Allow a type to explicitly state conformance via __swift_attr__.

An imported declaration which has storage that can't be represented in
Swift must not be inferred to be BitwiseCopyable: that inference
involves looking at the (visible) fields.
If an imported type's conformance cannot be implicitly inferred, allow
it to be explicitly stated via
`__attribute__((__swift_attr__("_BitwiseCopyable")))`.
@nate-chandler
Copy link
Contributor Author

@swift-ci please test

@nate-chandler nate-chandler marked this pull request as ready for review March 6, 2024 14:54
@nate-chandler nate-chandler merged commit 8569b6e into swiftlang:main Mar 6, 2024
@nate-chandler nate-chandler deleted the bitwise-copyable/20240305/1 branch March 6, 2024 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant