Skip to content

[5.9🍒] rename _forget to discard; deprecate _forget #65788

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 9, 2023

Conversation

kavon
Copy link
Member

@kavon kavon commented May 9, 2023

• Description: Use the final accepted keyword discard instead of _forget for SE-390's new statement.
• Risk: Low. Cond fail could happen, but I have a test confirming that it shouldn't since existing _forget's get emitted as _forget and will parse with just a warning.
• Original PR: #65787
• Reviewed By: Ben Cohen
• Testing: tests included
• Resolves: rdar://108859077

Companion PR: swiftlang/swift-syntax#1645

SE-390 concluded with choosing the keyword discard rather than forget for
the statement that disables the deinit of a noncopyable type. This commit
adds parsing support for `discard self` and adds a deprecation warning for
`_forget self`.

rdar://108859077
@kavon kavon requested a review from a team as a code owner May 9, 2023 05:03
@kavon
Copy link
Member Author

kavon commented May 9, 2023

@swift-ci please test

@kavon kavon requested review from jckarter, gottesmm and atrick May 9, 2023 05:04
@kavon
Copy link
Member Author

kavon commented May 9, 2023

swiftlang/swift-syntax#1645
@swift-ci please test

@airspeedswift airspeedswift merged commit 75e4f98 into swiftlang:release/5.9 May 9, 2023
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