Skip to content

[5.7][stdlib] Fix warning on Clock.Duration #58431

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
May 10, 2022

Conversation

lorentey
Copy link
Member

(Cherry picked from #58411, reviewed by @phausler, @slavapestov & @stephentyrone)

#42314 introduced Clock.Duration as an associated type:

@available(SwiftStdlib 5.7, *)
public protocol Clock: Sendable {
  associatedtype Duration: DurationProtocol
  associatedtype Instant: InstantProtocol where Instant.Duration == Duration}

Unfortunately this produces a warning:

…/swift/stdlib/public/Concurrency/Clock.swift:35:28: warning: redundant conformance constraint 'Self.Duration' : 'DurationProtocol'
  associatedtype Duration: DurationProtocol
                           ^

To keep the stdlib build log free of noise, it seems we’ll need to update this declaration to remove the direct requirement.

rdar://92306564

rdar://92306564
(cherry picked from commit 3136a4a)
@lorentey lorentey requested a review from stephentyrone April 27, 2022 00:19
@lorentey lorentey requested a review from a team as a code owner April 27, 2022 00:19
@lorentey
Copy link
Member Author

@swift-ci test

@lorentey lorentey merged commit d339d86 into swiftlang:release/5.7 May 10, 2022
@lorentey lorentey deleted the fix-duration-warning-5.7 branch May 10, 2022 18:11
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