Skip to content

[stdlib] use a primary associated type #61093

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 1 commit into from
Jan 3, 2024

Conversation

glessard
Copy link
Contributor

@glessard glessard commented Sep 14, 2022

Express the generic parameter of UnsafeMutableBufferPointer.initialize(fromContentsOf:) using some notation
(primary associated type).

Follow-up to SE-0370 (#41608), where this API was proposed using primary associated type notation.

Addresses rdar://99909349 (#61094)

@glessard
Copy link
Contributor Author

@swift-ci please test linux platform

@glessard
Copy link
Contributor Author

Blocked on rdar://99908987

@glessard
Copy link
Contributor Author

@swift-ci please test macOS platform

@glessard
Copy link
Contributor Author

@swift-ci please test linux platform

@glessard
Copy link
Contributor Author

glessard commented Jan 3, 2024

@swift-ci please test

@glessard
Copy link
Contributor Author

glessard commented Jan 3, 2024

rdar://99908987 was addressed in #70667, unblocking this.

@glessard glessard marked this pull request as ready for review January 3, 2024 18:43
@glessard glessard requested a review from a team as a code owner January 3, 2024 18:43
Copy link
Contributor

@Azoy Azoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor

@phausler phausler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These look way more readable! From what I can tell by visual inspection these will definitely work from a source compatibility standpoint and if I follow correctly they shouldn't have any ABI change either.

@glessard
Copy link
Contributor Author

glessard commented Jan 3, 2024

They don't affect ABI because they're always-emit-into-client. Otherwise the change on Slice would unfortunately have affected ABI.

@glessard glessard merged commit 3e73445 into swiftlang:main Jan 3, 2024
@glessard glessard deleted the se0370-primary-associated-types branch January 3, 2024 19:00
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.

3 participants