Skip to content

[6.0🍒] NCGenerics: introduce SuppressedAssociatedTypes #72812

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
merged 2 commits into from
Apr 4, 2024

Conversation

kavon
Copy link
Member

@kavon kavon commented Apr 3, 2024

6.0 cherry-pick #72786 and the test-only rider #72746.

  • Description: Gates support for ~Copyable associated types behind an experimental feature flag, SuppressedAssociatedTypes. The rationale is that they're not quite ready for prime-time and should be deferred from the current NoncopyableGenerics proposal / feature.
  • Scope of the issue: No issue

Reviewed by: @DougGregor

kavon added 2 commits April 3, 2024 12:26
There no longer is a lit feature called `noncopyable_generics`, it's
just always on now.

(cherry picked from commit 554fa49)
The model for associated types hasn't been fully worked-out for
noncopyable generics, but there is some support already that is being
used by the stdlib for an internal-only (and rather cursed) protocol
`_Pointer` to support `UnsafePointer`, etc.

This patch gates the existing experimental support for associated types
behind a feature flag. This flag doesn't emit feature-guards in
interfaces, since support for it is tied closely to NoncopyableGenerics
and has been there from its early days.

(cherry picked from commit 3098353)
@kavon kavon requested a review from a team as a code owner April 3, 2024 19:31
@kavon
Copy link
Member Author

kavon commented Apr 3, 2024

@swift-ci test

@kavon kavon enabled auto-merge April 4, 2024 21:35
@kavon kavon merged commit d9b9447 into swiftlang:release/6.0 Apr 4, 2024
@kavon kavon deleted the 6.0-associatedtype-restriction branch April 4, 2024 21:38
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