Delete blanket move constructor impls for `Unpin` types.

We have basically four options:

0. Do not allow calling inherent move constructors at all for `Unpin` types.
1. write a blanket impl, and only if the type isn't covered by the blanket impl do we allow calling the inherent move constructor. So we could keep the blanket impl, and only allow the C++ move constructor to be called on Unpin types if they are not default-constructible.
2. don't write a blanket impl.
3. write a blanket impl and *specialize*, even though specialization is unstable.

Option #0 is, I think, a bit of a non-option. For example, it prohibits moving from a `Box<SomeCxxType>` where `SomeCxxType` is trivially relocatable and all the rest, but doesn't implement `Default`.

With regards to option #1, well, the blanket impl was a bit gross! (e.g. it zeroes integers.) And, to add to that, the idea that a C++ type's move constructor would only sometimes be called, depending on the presence of a default-constructor, is, I think, a bit outrageous.

So option #1 is also out, leaving #2 and #3. We can always do #3 later, so I figure we should do #2 for now.

(We can also always do #1 later, but perhaps it should be a different function.)

PiperOrigin-RevId: 435663437
1 file changed
tree: 04dc16f9d012adb28e6cd2f146fbe27b5f2f9dfb
  1. lifetime_annotations/
  2. rs_bindings_from_cc/
  3. CODE_OF_CONDUCT
  4. CONTRIBUTING
  5. LICENSE
  6. README.md
README.md

Crubit: C++/Rust Bidirectional Interop Tool

Extremely experimental interop tooling for C++ and Rust.

Please don‘t use, this is an experiment and we don’t yet know where will it pull us. There will be breaking changes without warning. Unfortunately, we can't take contributions at this point.