Skip to content

Add CHANGELOG entry for redundant requirement warnings being disabled by default #59727

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
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@ _**Note:** This is in reverse chronological order, so newer entries are added to

## Swift 5.7

* The Swift compiler no longer warns about redundant requirements in generic declarations. For example,
the following code diagnosed a warning in Swift 5.6 about the `T.Iterator : IteratorProtocol`
requirement being redundant, because it is implied by `T : Sequence`:

```swift
func firstElement<T: Sequence>(_: T) -> T.Element where T.Iterator: IteratorProtocol {...}
```

A redundant requirement does not indicate a coding error, and sometimes it is desirable to spell them
out for documentation purposes. For this reason these warnings are now disabled by default.

To restore the previous behavior, pass the `-Xfrontend -warn-redundant-requirements`
compiler flag.

* [SE-0338][]:

Non-isolated async functions now always execute on the global concurrent pool,
Expand Down