Closed
Description
We need to put in place three checks (at least?) to prevent values with destructors from being moved out of:
- No pattern with by-move bindings that matches a type with a dtor (I think this is implemented)
- No moving from a subcomponent of a type with a dtor (e.g.,
x.f
wherex
has a dtor). Right now the borrow checker doesn't allow such moves, but there is no deep reason why it shouldn't, and the rest of the code is kind of setup to allow them whenever borrow checker gives the nod. - No moving out of a value with a dtor in FSU:
S { a, b, ..c }
wherec
has a dtor, even if this would otherwise be legal