Types that have "value semantics" should not have lexical lifetimes.
Value types are not expected to have custom deinits. Are not expected to
expose unsafe interior pointers. And cannot have weak references because
they are structs. Therefore, deinitialization barriers are irrelevant.
rdar://107076869
We ran into an issue on minimal stdlib build configurations, because they
pull slightly older toolchains to build and test the stdlib. Adding this flag
doesn't hurt anything and just ensures things will work with older compilers.
But it is not needed and should eventually be safe to remove.
part of resolving rdar://106849189
Originally move when it was in the stdlib as _move was behind a keyword but we
moved it in front to allow for some testing. Now that we are going with a
keyword (which we can't leave in/deprecate) move it behind the move only
experimental flag until this gets through evolution.
I also updated the move function tests to show that this is working. As a nice
bonus, I was able to enable all of the tests also in a non-optimized stdlib.
We process these as loadable vars. This is really useful since it ensures that
uniqueness is preserved in this case:
```
let x: K2
do {
x = self.k2
}
switch _move(x)[userHandle] {
case .foo:
assert(_isUnique(&self.k2))
}
```
I added a test that proves this.