Skip to content

[5.9🍒] require consume x for noncopyable pattern bindings since they're consuming #66774

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
Jun 21, 2023

Conversation

kavon
Copy link
Member

@kavon kavon commented Jun 20, 2023

• Description: Turns a warning about needing to explicitly write consume into an error so that we can make pattern bindings borrow by default in the future.
• Risk: Low. It's turning a warning into an error so there's source breaking concerns, but it's simple to fix.
• Original PR: #66713
• Reviewed By: Joe Groff
• Testing: regression tests included
• Resolves: rdar://110908714

…nsuming

this was staged in as a warning initially but it was intended to be
an error if it is not written so that we can move to a world where
these pattern matches are done as a borrowing operation instead.

rdar://110908714
(cherry picked from commit 36451ef)
@kavon kavon requested a review from a team as a code owner June 20, 2023 18:49
@kavon
Copy link
Member Author

kavon commented Jun 20, 2023

@swift-ci please test

@kavon kavon merged commit 618cc91 into swiftlang:release/5.9 Jun 21, 2023
@kavon kavon deleted the 5.9-require-switch-consume branch June 21, 2023 00:14
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