Closed
Description
This code compiles and runs the destructor twice:
class noncopyable {
i: (); new() { self.i = (); } drop { #error["dropped"]; }
}
enum wrapper = noncopyable;
fn main() {
let x1 = wrapper(noncopyable());
let x2 = move *x1;
}
If it's written let x2 <- *x1
, it instead errors with error: moving out of enum content
, which is perhaps what this should do too.