-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Enable moveonly / noncopyable types by default #64106
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
Conversation
@swift-ci please test macos platform |
084b639
to
195a219
Compare
@swift-ci please smoke test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found some little issues
195a219
to
746ab48
Compare
@swift-ci please smoke test |
746ab48
to
77a0192
Compare
@swift-ci smoke test |
a223dac
to
924064e
Compare
@swift-ci please test |
@swift-ci smoke test |
924064e
to
7a8ee06
Compare
this pulls just the move checking passes out from behind the experimental flag.
Also removes some redundant checks in SILGen for the flag in order to process `_move` and `_borrow` that are already checked for in Sema. We will keep those behind the feature flag for now.
Since these types depend on lexical borrow scopes (a SIL option), we're now making that the requirement whenever such types appear.
The move checker was converting some kinds of copies into their `explicit_copy_*` versions, despite the type of the copy being a copyable type. This was causing random crashes in some narrow circumstances. resolves rdar://106669967
These are just basic restrictions for now to help avoid mistakes. The restrictions are inferred based on how the move checker uses these instructions.
7a8ee06
to
ac60815
Compare
@swift-ci please test |
@swift-ci Please Test Source Compatibility |
a4d0116
to
22472a8
Compare
@swift-ci please test |
doesn't seem to be a need to skip destroy hoisting anymore.
the main things still left behind the experimental flag(s) are - move-only classes (guarded by MoveOnlyClasses feature) - noimplicitcopy - the _borrow operator
22472a8
to
2c7d9a5
Compare
@swift-ci please test |
@swift-ci Please Test Source Compatibility |
Wohoo, almost there! 🎉 🎉 🎉 |
Debug source compat failure is with |
This PR brings move-only types (still via
@_moveOnly
) out from behind the-enable-experimental-move-only
flag. We still hold back features like@_noImplicitCopy
and_borrow
.resolves rdar://106669967&106314333