Skip to content

[move-only] Teach the object/address move operator checker to not check move only types. #61964

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

@gottesmm gottesmm commented Nov 7, 2022

move only types will already be checked by the move only checker and said checker will still see move_value as a consume so we are just eliminating an unnecessary double diagnostic.

rdar://102056097

…only types.

move only types will already be checked by the move only checker and said
checker will still see move_value as a consume so we are just eliminating an
unnecessary double diagnostic.

rdar://102056097
@gottesmm
Copy link
Contributor Author

gottesmm commented Nov 7, 2022

@swift-ci test

…hen applying the move operator to move only vars.

The reason why we are doing this is that we want move only addresses to be
checked by the move only address checker and not the move operator address
checker.

rdar://102056097
@gottesmm gottesmm force-pushed the pr-140968cb0578adfb1af5718b8468c8c391695642 branch from 95e1e01 to 26db1f2 Compare November 7, 2022 22:29
@gottesmm gottesmm changed the title [move-only] Teach the object move operator checker to not check move only types. [move-only] Teach the object/address move operator checker to not check move only types. Nov 7, 2022
@gottesmm
Copy link
Contributor Author

gottesmm commented Nov 7, 2022

@swift-ci test

@gottesmm
Copy link
Contributor Author

gottesmm commented Nov 7, 2022

I decided to include in this PR the corresponding work that accomplishes the same thing for vars. It works in a slightly different manner by having us emit a copy_addr instead of a mark_must_check_unresolved. This then causes the difference in behavior.

@gottesmm
Copy link
Contributor Author

gottesmm commented Nov 8, 2022

@swift-ci test macOS platform

1 similar comment
@gottesmm
Copy link
Contributor Author

gottesmm commented Nov 8, 2022

@swift-ci test macOS platform

@gottesmm gottesmm merged commit cb6e5d1 into swiftlang:main Nov 8, 2022
@gottesmm gottesmm deleted the pr-140968cb0578adfb1af5718b8468c8c391695642 branch November 8, 2022 06:38
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