Skip to content

Replace bespoke Sendable and Copyable conformance on tuples with tuple conformances #67839

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

slavapestov
Copy link
Contributor

@slavapestov slavapestov commented Aug 9, 2023

Hopefully NFC. These now behave as if they were declared in the following way:

extension Builtin.TheTupleType: Sendable where repeat each Elements: Sendable {}
extension Builtin.TheTupleType: Copyable where repeat each Elements: Copyable {}

However we don't want to use experimental source language features in the standard library, so I hacked the compiler to conjure up the extension declarations in the Builtin module instead. Once we have real syntax for tuple conformances we can move the declarations to the standard library. The old mechanism, which predates parameter packs and synthesizes a fake generic signature for each tuple arity, is no longer needed.

@slavapestov slavapestov force-pushed the tuple-conformance-sendable-copyable branch from 6a6e131 to a1f816d Compare August 9, 2023 21:43
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov
Copy link
Contributor Author

@swift-ci Please test source compatibility

@slavapestov slavapestov force-pushed the tuple-conformance-sendable-copyable branch from a1f816d to c26cafc Compare August 9, 2023 22:30
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov
Copy link
Contributor Author

@swift-ci Please test source compatibility

@slavapestov slavapestov merged commit c6387fd into swiftlang:main Aug 10, 2023
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