Skip to content

[move-only] Initial patch for move only address checking. #60889

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 3 commits into from
Sep 12, 2022

Conversation

gottesmm
Copy link
Contributor

I handle now var, inout, mutating self that are non-trivial/loadable. Also, I handle inits correctly. Still a work in progress, but enough is done to get something into tree.

@gottesmm gottesmm requested a review from atrick August 31, 2022 23:48
@gottesmm
Copy link
Contributor Author

@swift-ci test

@gottesmm gottesmm dismissed eeckstein’s stale review September 9, 2022 20:15

Fixed the problem in a different PR that was approved by Erik.

…cker.

Some notes:

1. I added support for both loadable/address only types.

2. These tests are based off of porting the move only object tests for inout,
vars, mutating self, etc.

3. I did not include already written tests for address only types in this
specific merge since I need to change us to borrow move only var like types.
Without that, we get a lot of spurious error msgs and the burden of writing that
is not worth it. So instead in a forthcoming commit where I fix that issue in
SILGen, I will commit the corresponding address only tests for this work.

4. I did not include support for trivial types in this. I am going to do
object/address for that at the same time.
@gottesmm gottesmm force-pushed the initial-move-only-address-checker branch from ae4dd88 to 0a16cc3 Compare September 12, 2022 01:58
@gottesmm
Copy link
Contributor Author

@swift-ci test

@gottesmm
Copy link
Contributor Author

One thing to keep in mind with this patch series is that I left out the address only tests that I have on a branch. This was done on purpose since until I fix SILGen to make it so that we borrow move only var like things when we pass them to function arguments, we hit a ton of spurious errors on the tests. I am going to upload those tests together with the borrow fix just to save my hands a ton of unnecessary typing.

@gottesmm gottesmm merged commit 8f0dd56 into swiftlang:main Sep 12, 2022
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