Skip to content

6.0: [BitwiseCopyable] Drop req from SIMD/Storage. #73899

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

Conversation

nate-chandler
Copy link
Contributor

Explanation: Remove the BitwiseCopyable constraint from SIMDStorage and SIMD.
Scope: Affects BitwiseCopyable checking of SIMD-related conformances.
Issue: rdar://128661878
Original PR: #73890
Risk: Low.
Testing: Adds a test case that should type-check.
Reviewer: Stephen Canon ( @stephentyrone )

There are conformers to SIMDStorage (like that in the added test case)
which involve an Array (a type that can't conform to BitwiseCopyable).
So lift the constraint on SIMDStorage.  This in turn requires lifting
the constraint on SIMD (otherwise, e.g. `SIMD8<Scalar>` would fail to
conform since it has as a member some SIMD8Storage which is only
constrained to conform to `SIMDStorage`; the `SIMD8Storage`
associatedtype also cannot be constrained to `BitwiseCopyable` because
that storage may again not conform as in the test example).

rdar://128661878
@nate-chandler nate-chandler requested a review from a team as a code owner May 24, 2024 20:58
@nate-chandler
Copy link
Contributor Author

@swift-ci please test

@nate-chandler nate-chandler enabled auto-merge May 24, 2024 22:16
@nate-chandler
Copy link
Contributor Author

@swift-ci please test macos platform

@nate-chandler nate-chandler merged commit 92676b5 into swiftlang:release/6.0 May 25, 2024
5 checks passed
@nate-chandler nate-chandler deleted the cherrypick/release/6.0/rdar128661878 branch May 25, 2024 23:34
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.

2 participants