Skip to content

[move-only] When performing borrow to destructure transform and failing, make sure we clean up appropriately. #63337

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

Conversation

gottesmm
Copy link
Contributor

No description provided.

…mits an error, we clean up the IR appropriately.

This ensures we appropriately eliminate mark_must_check if we error and change
copy_value -> explicit_copy_value.
…ecker rather than as a separate pass.

The reason that I am doing this is I discovered that we emit worse quality
diagnostics since if we emit an error while running the borrow to destructure
transform, we want to do a complete cleanup to be safe (e.x.: converting
copy_value -> explicit_copy_value). This causes the object checker to then not
emit any additional diagnostics for other variables that were not impacted by
the BorrowToDestructureTransform, reducing the quality of diagnostics in a
significant way that isn't needed.
@gottesmm
Copy link
Contributor Author

@swift-ci smoke test

@gottesmm gottesmm merged commit 9cf008c into swiftlang:main Feb 1, 2023
@gottesmm gottesmm deleted the pr-d2869554cff24b4059130c3f6192a1417ed9b9cb branch February 1, 2023 05:04
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.

1 participant